Skip to content

Commit 5b9cc9e

Browse files
committed
---
yaml --- r: 135903 b: refs/heads/try c: 40ce87f h: refs/heads/master i: 135901: 030cd96 135899: d1f5f0e 135895: 3def2a8 135887: 28c2604 135871: 8b09624 v: v3
1 parent 0d18201 commit 5b9cc9e

File tree

99 files changed

+442
-976
lines changed

Some content is hidden

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

99 files changed

+442
-976
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 8794107f74682607f368776cc8b78820629778e6
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ae81c89f34f1ac2cdb596cf216612e94822a8466
5-
refs/heads/try: fa6b2d4c3b81e6adcfae87dac25fb7d50b2dd39f
5+
refs/heads/try: 40ce87f6ede1d3963258bf35c882a895b02a82b7
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/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 "dev" "the name of the release channel to build"
456+
valopt release-channel "source" "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: This needs to parameterized over target triples. Do it in platform.mk
461+
# FIXME: Thise 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-
(dev | nightly | beta | stable)
482+
(source | nightly | beta | stable)
483483
;;
484484
(*)
485-
err "release channel must be 'dev', 'nightly', 'beta' or 'stable'"
485+
err "release channel must be 'source', 'nightly', 'beta' or 'stable'"
486486
;;
487487
esac
488488

branches/try/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 libc
74+
DEPS_syntax := std term serialize log fmt_macros debug arena
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

branches/try/mk/dist.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ distcheck-docs: dist-docs
283283

284284
ifdef CFG_WINDOWSY_$(CFG_BUILD)
285285

286-
dist: dist-win dist-tar-bins
286+
dist: dist-win
287287

288288
distcheck: distcheck-win
289289
$(Q)rm -Rf tmp/distcheck

branches/try/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),dev)
39-
CFG_RELEASE=$(CFG_RELEASE_NUM)-dev
40-
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-dev
38+
ifeq ($(CFG_RELEASE_CHANNEL),source)
39+
CFG_RELEASE=$(CFG_RELEASE_NUM)-pre
40+
CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-pre
4141
endif
4242

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

branches/try/src/doc/guide.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4325,6 +4325,8 @@ 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+
43284330
let greater_than_forty_two = range(0i, 100i)
43294331
.find(|x| *x >= 42);
43304332

branches/try/src/etc/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ then
325325
if [ -z "${CFG_UNINSTALL}" ]
326326
then
327327
msg "verifying platform can run binaries"
328-
export $CFG_LD_PATH_VAR="${CFG_SRC_DIR}/lib:$CFG_OLD_LD_PATH_VAR"
328+
export $CFG_LD_PATH_VAR="${CFG_SRC_DIR}/lib":$CFG_OLD_LD_PATH_VAR
329329
"${CFG_SRC_DIR}/bin/rustc" --version > /dev/null
330330
if [ $? -ne 0 ]
331331
then
@@ -489,7 +489,7 @@ then
489489
"${CFG_PREFIX}/bin/rustc" --version 2> /dev/null 1> /dev/null
490490
if [ $? -ne 0 ]
491491
then
492-
export $CFG_LD_PATH_VAR="${CFG_PREFIX}/lib:$CFG_OLD_LD_PATH_VAR"
492+
export $CFG_LD_PATH_VAR="${CFG_PREFIX}/lib":$CFG_OLD_LD_PATH_VAR
493493
"${CFG_PREFIX}/bin/rustc" --version > /dev/null
494494
if [ $? -ne 0 ]
495495
then

branches/try/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-2014 Mozilla Foundation, MIT license
11+
AppCopyright=Copyright (C) 2006-2013 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 = 'system';
46+
ModPathType = 'user';
4747
4848
function ModPathDir(): TArrayOfString;
4949
begin

branches/try/src/grammar/RustLexer.g4

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

123-
fragment FLOAT_SUFFIX
123+
FLOAT_SUFFIX
124124
: 'f32'
125125
| 'f64'
126+
| 'f128'
126127
;
127128

128129
LIT_FLOAT

branches/try/src/liballoc/boxed.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ 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+
}
99105
}
100106

101107
#[stable]

branches/try/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::GcBox<()>>();
19+
let header_size = mem::size_of::<raw::Box<()>>();
2020
let total_size = align_to(header_size, body_align) + body_size;
2121
total_size
2222
}

branches/try/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, PartialOrd, Ord, Hash)]
19+
#[deriving(Clone, PartialEq, Eq, 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

branches/try/src/libcollections/string.rs

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

@@ -531,7 +530,7 @@ impl String {
531530
/// assert_eq!(s.as_slice(), "abc123");
532531
/// ```
533532
#[inline]
534-
#[stable = "function just renamed from push_char"]
533+
#[stable = "function just renamed from push"]
535534
pub fn push(&mut self, ch: char) {
536535
let cur_len = self.len();
537536
// This may use up to 4 bytes.
@@ -927,28 +926,6 @@ impl<S: Str> Add<S, String> for String {
927926
}
928927
}
929928

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-
952929
/// Unsafe operations
953930
#[unstable = "waiting on raw module conventions"]
954931
pub mod raw {
@@ -1313,15 +1290,6 @@ mod tests {
13131290
#[test] #[should_fail] fn insert_bad1() { "".to_string().insert(1, 't'); }
13141291
#[test] #[should_fail] fn insert_bad2() { "ệ".to_string().insert(1, 't'); }
13151292

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-
13251293
#[bench]
13261294
fn bench_with_capacity(b: &mut Bencher) {
13271295
b.iter(|| {

branches/try/src/libcollections/vec.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2393,6 +2393,8 @@ mod tests {
23932393
let _ = vec[3];
23942394
}
23952395

2396+
// NOTE uncomment after snapshot
2397+
/*
23962398
#[test]
23972399
#[should_fail]
23982400
fn test_slice_out_of_bounds_1() {
@@ -2427,6 +2429,7 @@ mod tests {
24272429
let x: Vec<int> = vec![1, 2, 3, 4, 5];
24282430
x[3..2];
24292431
}
2432+
*/
24302433

24312434
#[test]
24322435
fn test_swap_remove_empty() {

branches/try/src/libcore/failure.rs

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,24 @@
3333
use fmt;
3434
use intrinsics;
3535

36+
// NOTE: remove after next snapshot
37+
#[cfg(stage0)]
38+
#[cold] #[inline(never)] // this is the slow path, always
39+
#[lang="fail_"]
40+
fn fail_(expr_file_line: &(&'static str, &'static str, uint)) -> ! {
41+
let (expr, file, line) = *expr_file_line;
42+
let ref file_line = (file, line);
43+
format_args!(|args| -> () {
44+
fail_fmt(args, file_line);
45+
}, "{}", expr);
46+
47+
unsafe { intrinsics::abort() }
48+
}
49+
50+
#[cfg(not(stage0))]
3651
#[cold] #[inline(never)] // this is the slow path, always
3752
#[lang="fail"]
38-
pub fn fail(expr_file_line: &(&'static str, &'static str, uint)) -> ! {
53+
fn fail(expr_file_line: &(&'static str, &'static str, uint)) -> ! {
3954
let (expr, file, line) = *expr_file_line;
4055
let ref file_line = (file, line);
4156
format_args!(|args| -> () {
@@ -55,10 +70,23 @@ fn fail_bounds_check(file_line: &(&'static str, uint),
5570
unsafe { intrinsics::abort() }
5671
}
5772

73+
#[cold] #[inline(never)]
74+
pub fn fail_str(msg: &str, file: &(&'static str, uint)) -> ! {
75+
format_args!(|fmt| fail_fmt(fmt, file), "{}", msg)
76+
}
77+
5878
#[cold] #[inline(never)]
5979
pub fn fail_fmt(fmt: &fmt::Arguments, file_line: &(&'static str, uint)) -> ! {
6080
#[allow(ctypes)]
6181
extern {
82+
83+
// NOTE: remove after next snapshot
84+
#[cfg(stage0)]
85+
#[lang = "begin_unwind"]
86+
fn fail_impl(fmt: &fmt::Arguments, file: &'static str,
87+
line: uint) -> !;
88+
89+
#[cfg(not(stage0))]
6290
#[lang = "fail_fmt"]
6391
fn fail_impl(fmt: &fmt::Arguments, file: &'static str,
6492
line: uint) -> !;

branches/try/src/libcore/iter.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ pub trait Iterator<A> {
366366
/// let mut sum = 0;
367367
/// for x in it {
368368
/// if x > 5 {
369-
/// break;
369+
/// continue;
370370
/// }
371371
/// sum += x;
372372
/// }
@@ -377,8 +377,6 @@ pub trait Iterator<A> {
377377
/// sum
378378
/// }
379379
/// let x = vec![1i,2,3,7,8,9];
380-
/// assert_eq!(process(x.into_iter()), 6);
381-
/// let x = vec![1i,2,3];
382380
/// assert_eq!(process(x.into_iter()), 1006);
383381
/// ```
384382
#[inline]

branches/try/src/libcore/macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ macro_rules! fail(
1717
fail!("{}", "explicit failure")
1818
);
1919
($msg:expr) => ({
20-
static _MSG_FILE_LINE: (&'static str, &'static str, uint) = ($msg, file!(), line!());
21-
::core::failure::fail(&_MSG_FILE_LINE)
20+
static _FILE_LINE: (&'static str, uint) = (file!(), line!());
21+
::core::failure::fail_str($msg, &_FILE_LINE)
2222
});
2323
($fmt:expr, $($arg:tt)*) => ({
2424
// a closure can't have return type !, so we need a full

branches/try/src/libcore/ops.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -764,13 +764,13 @@ pub trait Slice<Idx, Sized? Result> for Sized? {
764764
// FIXME(#17273) remove the postscript _s
765765
#[lang="slice_mut"]
766766
pub trait SliceMut<Idx, Sized? Result> for Sized? {
767-
/// The method for the slicing operation foo[mut]
767+
/// The method for the slicing operation foo[]
768768
fn as_mut_slice_<'a>(&'a mut self) -> &'a mut Result;
769-
/// The method for the slicing operation foo[mut from..]
769+
/// The method for the slicing operation foo[from..]
770770
fn slice_from_mut_<'a>(&'a mut self, from: &Idx) -> &'a mut Result;
771-
/// The method for the slicing operation foo[mut ..to]
771+
/// The method for the slicing operation foo[..to]
772772
fn slice_to_mut_<'a>(&'a mut self, to: &Idx) -> &'a mut Result;
773-
/// The method for the slicing operation foo[mut from..to]
773+
/// The method for the slicing operation foo[from..to]
774774
fn slice_mut_<'a>(&'a mut self, from: &Idx, to: &Idx) -> &'a mut Result;
775775
}
776776
/**

branches/try/src/libcore/option.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ impl<T> Option<T> {
312312
pub fn expect(self, msg: &str) -> T {
313313
match self {
314314
Some(val) => val,
315-
None => fail!("{}", msg),
315+
None => fail!(msg),
316316
}
317317
}
318318

branches/try/src/libcore/raw.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
2121
use mem;
2222

23-
/// The representation of `std::gc::Gc`.
24-
pub struct GcBox<T> {
23+
/// The representation of a Rust managed box
24+
pub struct Box<T> {
2525
pub ref_count: uint,
2626
pub drop_glue: fn(ptr: *mut u8),
27-
pub prev: *mut GcBox<T>,
28-
pub next: *mut GcBox<T>,
27+
pub prev: *mut Box<T>,
28+
pub next: *mut Box<T>,
2929
pub data: T,
3030
}
3131

branches/try/src/libcore/str.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,6 @@ pub mod traits {
11231123
use collections::Collection;
11241124
use iter::Iterator;
11251125
use option::{Option, Some};
1126-
use ops;
11271126
use str::{Str, StrSlice, eq_slice};
11281127

11291128
impl<'a> Ord for &'a str {
@@ -1163,28 +1162,6 @@ pub mod traits {
11631162
#[inline]
11641163
fn equiv(&self, other: &S) -> bool { eq_slice(*self, other.as_slice()) }
11651164
}
1166-
1167-
impl ops::Slice<uint, str> for str {
1168-
#[inline]
1169-
fn as_slice_<'a>(&'a self) -> &'a str {
1170-
self
1171-
}
1172-
1173-
#[inline]
1174-
fn slice_from_<'a>(&'a self, from: &uint) -> &'a str {
1175-
self.slice_from(*from)
1176-
}
1177-
1178-
#[inline]
1179-
fn slice_to_<'a>(&'a self, to: &uint) -> &'a str {
1180-
self.slice_to(*to)
1181-
}
1182-
1183-
#[inline]
1184-
fn slice_<'a>(&'a self, from: &uint, to: &uint) -> &'a str {
1185-
self.slice(*from, *to)
1186-
}
1187-
}
11881165
}
11891166

11901167
/// Any string that can be represented as a slice

0 commit comments

Comments
 (0)