Skip to content

Commit 1f3cda8

Browse files
committed
auto merge of rust-lang#17629 : alexcrichton/rust/rollup, r=alexcrichton
2 parents 5079a10 + d3e1718 commit 1f3cda8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+727
-279
lines changed

configure

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -453,12 +453,12 @@ valopt datadir "${CFG_PREFIX}/share" "install data"
453453
valopt infodir "${CFG_PREFIX}/share/info" "install additional info"
454454
valopt mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
455455

456-
valopt release-channel "source" "the name of the release channel to build"
456+
valopt release-channel "dev" "the name of the release channel to build"
457457

458458
# On windows we just store the libraries in the bin directory because
459459
# there's no rpath. This is where the build system itself puts libraries;
460460
# --libdir is used to configure the installation directory.
461-
# FIXME: Thise needs to parameterized over target triples. Do it in platform.mk
461+
# FIXME: This needs to parameterized over target triples. Do it in platform.mk
462462
CFG_LIBDIR_RELATIVE=lib
463463
if [ "$CFG_OSTYPE" = "pc-mingw32" ] || [ "$CFG_OSTYPE" = "w64-mingw32" ]
464464
then
@@ -479,10 +479,10 @@ validate_opt
479479

480480
# Validate the release channel
481481
case "$CFG_RELEASE_CHANNEL" in
482-
(source | nightly | beta | stable)
482+
(dev | nightly | beta | stable)
483483
;;
484484
(*)
485-
err "release channel must be 'source', 'nightly', 'beta' or 'stable'"
485+
err "release channel must be 'dev', 'nightly', 'beta' or 'stable'"
486486
;;
487487
esac
488488

mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ DEPS_graphviz := std
7171
DEPS_green := std native:context_switch
7272
DEPS_rustuv := std native:uv native:uv_support
7373
DEPS_native := std
74-
DEPS_syntax := std term serialize log fmt_macros debug arena
74+
DEPS_syntax := std term serialize log fmt_macros debug arena libc
7575
DEPS_rustc := syntax flate arena serialize getopts rbml \
7676
time log graphviz debug rustc_llvm rustc_back
7777
DEPS_rustc_llvm := native:rustllvm libc std

mk/main.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ ifeq ($(CFG_RELEASE_CHANNEL),nightly)
3535
CFG_RELEASE=$(CFG_RELEASE_NUM)-nightly
3636
CFG_PACKAGE_VERS=nightly
3737
endif
38-
ifeq ($(CFG_RELEASE_CHANNEL),source)
39-
CFG_RELEASE=$(CFG_RELEASE_NUM)-pre
40-
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-pre
38+
ifeq ($(CFG_RELEASE_CHANNEL),dev)
39+
CFG_RELEASE=$(CFG_RELEASE_NUM)-dev
40+
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-dev
4141
endif
4242

4343
# The name of the package to use for creating tarballs, installers etc.

src/doc/guide.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4325,8 +4325,6 @@ and so we tell it that we want a vector of integers.
43254325
is one:
43264326

43274327
```{rust}
4328-
let one_to_one_hundred = range(0i, 100i);
4329-
43304328
let greater_than_forty_two = range(0i, 100i)
43314329
.find(|x| *x >= 42);
43324330

src/etc/pkg/rust.iss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
SetupIconFile=rust-logo.ico
99
AppName=Rust
1010
AppVersion={#CFG_RELEASE}
11-
AppCopyright=Copyright (C) 2006-2013 Mozilla Foundation, MIT license
11+
AppCopyright=Copyright (C) 2006-2014 Mozilla Foundation, MIT license
1212
AppPublisher=Mozilla Foundation
1313
AppPublisherURL=http://www.rust-lang.org
1414
VersionInfoVersion={#CFG_VERSION_WIN}
@@ -43,7 +43,7 @@ Source: "tmp/dist/win/*.*" ; DestDir: "{app}"; Flags: ignoreversion recursesubdi
4343
[Code]
4444
const
4545
ModPathName = 'modifypath';
46-
ModPathType = 'user';
46+
ModPathType = 'system';
4747
4848
function ModPathDir(): TArrayOfString;
4949
begin

src/grammar/RustLexer.g4

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,9 @@ LIT_INTEGER
120120
| '0x' [0-9a-fA-F][0-9a-fA-F_]* INT_SUFFIX?
121121
;
122122

123-
FLOAT_SUFFIX
123+
fragment FLOAT_SUFFIX
124124
: 'f32'
125125
| 'f64'
126-
| 'f128'
127126
;
128127

129128
LIT_FLOAT

src/liballoc/boxed.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,6 @@ pub trait BoxAny {
9696
/// `Err(Self)` if it isn't.
9797
#[unstable = "naming conventions around accessing innards may change"]
9898
fn downcast<T: 'static>(self) -> Result<Box<T>, Self>;
99-
100-
/// Deprecated; this method has been renamed to `downcast`.
101-
#[deprecated = "use downcast instead"]
102-
fn move<T: 'static>(self) -> Result<Box<T>, Self> {
103-
self.downcast::<T>()
104-
}
10599
}
106100

107101
#[stable]

src/liballoc/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use core::raw;
1616
#[inline]
1717
#[deprecated]
1818
pub fn get_box_size(body_size: uint, body_align: uint) -> uint {
19-
let header_size = mem::size_of::<raw::Box<()>>();
19+
let header_size = mem::size_of::<raw::GcBox<()>>();
2020
let total_size = align_to(header_size, body_align) + body_size;
2121
total_size
2222
}

src/libcollections/enum_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use core::prelude::*;
1717
use core::fmt;
1818

19-
#[deriving(Clone, PartialEq, Eq, Hash)]
19+
#[deriving(Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2020
/// A specialized `Set` implementation to use enum types.
2121
pub struct EnumSet<E> {
2222
// We must maintain the invariant that no bits are set

src/libcollections/string.rs

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use core::default::Default;
1818
use core::fmt;
1919
use core::mem;
2020
use core::ptr;
21+
use core::ops;
2122
// FIXME: ICE's abound if you import the `Slice` type while importing `Slice` trait
2223
use core::raw::Slice as RawSlice;
2324

@@ -530,7 +531,7 @@ impl String {
530531
/// assert_eq!(s.as_slice(), "abc123");
531532
/// ```
532533
#[inline]
533-
#[stable = "function just renamed from push"]
534+
#[stable = "function just renamed from push_char"]
534535
pub fn push(&mut self, ch: char) {
535536
let cur_len = self.len();
536537
// This may use up to 4 bytes.
@@ -926,6 +927,28 @@ impl<S: Str> Add<S, String> for String {
926927
}
927928
}
928929

930+
impl ops::Slice<uint, str> for String {
931+
#[inline]
932+
fn as_slice_<'a>(&'a self) -> &'a str {
933+
self.as_slice()
934+
}
935+
936+
#[inline]
937+
fn slice_from_<'a>(&'a self, from: &uint) -> &'a str {
938+
self[][*from..]
939+
}
940+
941+
#[inline]
942+
fn slice_to_<'a>(&'a self, to: &uint) -> &'a str {
943+
self[][..*to]
944+
}
945+
946+
#[inline]
947+
fn slice_<'a>(&'a self, from: &uint, to: &uint) -> &'a str {
948+
self[][*from..*to]
949+
}
950+
}
951+
929952
/// Unsafe operations
930953
#[unstable = "waiting on raw module conventions"]
931954
pub mod raw {
@@ -1290,6 +1313,15 @@ mod tests {
12901313
#[test] #[should_fail] fn insert_bad1() { "".to_string().insert(1, 't'); }
12911314
#[test] #[should_fail] fn insert_bad2() { "ệ".to_string().insert(1, 't'); }
12921315

1316+
#[test]
1317+
fn test_slicing() {
1318+
let s = "foobar".to_string();
1319+
assert_eq!("foobar", s[]);
1320+
assert_eq!("foo", s[..3]);
1321+
assert_eq!("bar", s[3..]);
1322+
assert_eq!("oob", s[1..4]);
1323+
}
1324+
12931325
#[bench]
12941326
fn bench_with_capacity(b: &mut Bencher) {
12951327
b.iter(|| {

0 commit comments

Comments
 (0)