Skip to content

Commit cae7efb

Browse files
committed
---
yaml --- r: 207724 b: refs/heads/snap-stage3 c: 5e37729 h: refs/heads/master v: v3
1 parent b264c09 commit cae7efb

File tree

124 files changed

+974
-3572
lines changed

Some content is hidden

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

124 files changed

+974
-3572
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 38a97becdf3e6a6157f6f7ec2d98ade8d8edc193
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 2b8c9b12f91c0bf2c1e6278a5f803c2df3698432
4+
refs/heads/snap-stage3: 5e37729036bd1fd4207cf78ec19d04d24c5107f1
55
refs/heads/try: 7b4ef47b7805a402d756fb8157101f64880a522f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,10 +659,9 @@ if [ -n "$CFG_ENABLE_DEBUG" ]; then
659659
CFG_DISABLE_OPTIMIZE=1
660660
CFG_DISABLE_OPTIMIZE_CXX=1
661661
fi
662+
CFG_ENABLE_LLVM_ASSERTIONS=1
662663
CFG_ENABLE_DEBUG_ASSERTIONS=1
663664
CFG_ENABLE_DEBUG_JEMALLOC=1
664-
CFG_ENABLE_DEBUGINFO=1
665-
CFG_ENABLE_LLVM_ASSERTIONS=1
666665
fi
667666

668667
# OK, now write the debugging options
@@ -1144,6 +1143,7 @@ do
11441143
make_dir $h/test/run-pass-valgrind
11451144
make_dir $h/test/run-pass-fulldeps
11461145
make_dir $h/test/run-fail
1146+
make_dir $h/test/run-fail-fulldeps
11471147
make_dir $h/test/compile-fail
11481148
make_dir $h/test/parse-fail
11491149
make_dir $h/test/compile-fail-fulldeps

branches/snap-stage3/mk/tests.mk

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ check-stage$(1)-T-$(2)-H-$(3)-exec: \
304304
check-stage$(1)-T-$(2)-H-$(3)-pfail-exec \
305305
check-stage$(1)-T-$(2)-H-$(3)-rpass-valgrind-exec \
306306
check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
307+
check-stage$(1)-T-$(2)-H-$(3)-rfail-full-exec \
307308
check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec \
308309
check-stage$(1)-T-$(2)-H-$(3)-rmake-exec \
309310
check-stage$(1)-T-$(2)-H-$(3)-rustdocck-exec \
@@ -345,6 +346,7 @@ check-stage$(1)-T-$(2)-H-$(3)-pretty-exec: \
345346
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-valgrind-exec \
346347
check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full-exec \
347348
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-exec \
349+
check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-full-exec \
348350
check-stage$(1)-T-$(2)-H-$(3)-pretty-bench-exec \
349351
check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty-exec
350352

@@ -464,6 +466,7 @@ $(foreach host,$(CFG_HOST), \
464466
RPASS_RS := $(wildcard $(S)src/test/run-pass/*.rs)
465467
RPASS_VALGRIND_RS := $(wildcard $(S)src/test/run-pass-valgrind/*.rs)
466468
RPASS_FULL_RS := $(wildcard $(S)src/test/run-pass-fulldeps/*.rs)
469+
RFAIL_FULL_RS := $(wildcard $(S)src/test/run-fail-fulldeps/*.rs)
467470
CFAIL_FULL_RS := $(wildcard $(S)src/test/compile-fail-fulldeps/*.rs)
468471
RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs)
469472
CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs)
@@ -483,6 +486,7 @@ PERF_RS := $(wildcard $(S)src/test/bench/*.rs)
483486
RPASS_TESTS := $(RPASS_RS)
484487
RPASS_VALGRIND_TESTS := $(RPASS_VALGRIND_RS)
485488
RPASS_FULL_TESTS := $(RPASS_FULL_RS)
489+
RFAIL_FULL_TESTS := $(RFAIL_FULL_RS)
486490
CFAIL_FULL_TESTS := $(CFAIL_FULL_RS)
487491
RFAIL_TESTS := $(RFAIL_RS)
488492
CFAIL_TESTS := $(CFAIL_RS)
@@ -510,6 +514,11 @@ CTEST_BUILD_BASE_rpass-full = run-pass-fulldeps
510514
CTEST_MODE_rpass-full = run-pass
511515
CTEST_RUNTOOL_rpass-full = $(CTEST_RUNTOOL)
512516

517+
CTEST_SRC_BASE_rfail-full = run-fail-fulldeps
518+
CTEST_BUILD_BASE_rfail-full = run-fail-fulldeps
519+
CTEST_MODE_rfail-full = run-fail
520+
CTEST_RUNTOOL_rfail-full = $(CTEST_RUNTOOL)
521+
513522
CTEST_SRC_BASE_cfail-full = compile-fail-fulldeps
514523
CTEST_BUILD_BASE_cfail-full = compile-fail-fulldeps
515524
CTEST_MODE_cfail-full = compile-fail
@@ -661,6 +670,7 @@ endif
661670
CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS)
662671
CTEST_DEPS_rpass-valgrind_$(1)-T-$(2)-H-$(3) = $$(RPASS_VALGRIND_TESTS)
663672
CTEST_DEPS_rpass-full_$(1)-T-$(2)-H-$(3) = $$(RPASS_FULL_TESTS) $$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(1)_T_$(2)_H_$(3))
673+
CTEST_DEPS_rfail-full_$(1)-T-$(2)-H-$(3) = $$(RFAIL_FULL_TESTS) $$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(1)_T_$(2)_H_$(3))
664674
CTEST_DEPS_cfail-full_$(1)-T-$(2)-H-$(3) = $$(CFAIL_FULL_TESTS) $$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(1)_T_$(2)_H_$(3))
665675
CTEST_DEPS_rfail_$(1)-T-$(2)-H-$(3) = $$(RFAIL_TESTS)
666676
CTEST_DEPS_cfail_$(1)-T-$(2)-H-$(3) = $$(CFAIL_TESTS)
@@ -737,7 +747,7 @@ endif
737747

738748
endef
739749

740-
CTEST_NAMES = rpass rpass-valgrind rpass-full cfail-full rfail cfail pfail \
750+
CTEST_NAMES = rpass rpass-valgrind rpass-full rfail-full cfail-full rfail cfail pfail \
741751
bench perf debuginfo-gdb debuginfo-lldb codegen rustdocck
742752

743753
$(foreach host,$(CFG_HOST), \
@@ -746,22 +756,26 @@ $(foreach host,$(CFG_HOST), \
746756
$(eval $(foreach name,$(CTEST_NAMES), \
747757
$(eval $(call DEF_RUN_COMPILETEST,$(stage),$(target),$(host),$(name))))))))))
748758

749-
PRETTY_NAMES = pretty-rpass pretty-rpass-valgrind pretty-rpass-full pretty-rfail pretty-bench pretty-pretty
759+
PRETTY_NAMES = pretty-rpass pretty-rpass-valgrind pretty-rpass-full pretty-rfail-full pretty-rfail \
760+
pretty-bench pretty-pretty
750761
PRETTY_DEPS_pretty-rpass = $(RPASS_TESTS)
751762
PRETTY_DEPS_pretty-rpass-valgrind = $(RPASS_VALGRIND_TESTS)
752763
PRETTY_DEPS_pretty-rpass-full = $(RPASS_FULL_TESTS)
764+
PRETTY_DEPS_pretty-rfail-full = $(RFAIL_FULL_TESTS)
753765
PRETTY_DEPS_pretty-rfail = $(RFAIL_TESTS)
754766
PRETTY_DEPS_pretty-bench = $(BENCH_TESTS)
755767
PRETTY_DEPS_pretty-pretty = $(PRETTY_TESTS)
756768
PRETTY_DIRNAME_pretty-rpass = run-pass
757769
PRETTY_DIRNAME_pretty-rpass-valgrind = run-pass-valgrind
758770
PRETTY_DIRNAME_pretty-rpass-full = run-pass-fulldeps
771+
PRETTY_DIRNAME_pretty-rfail-full = run-fail-fulldeps
759772
PRETTY_DIRNAME_pretty-rfail = run-fail
760773
PRETTY_DIRNAME_pretty-bench = bench
761774
PRETTY_DIRNAME_pretty-pretty = pretty
762775

763776
define DEF_PRETTY_FULLDEPS
764777
PRETTY_DEPS$(1)_T_$(2)_H_$(3)_pretty-rpass-full = $$(CSREQ$(1)_T_$(3)_H_$(3))
778+
PRETTY_DEPS$(1)_T_$(2)_H_$(3)_pretty-rfail-full = $$(CSREQ$(1)_T_$(3)_H_$(3))
765779
endef
766780

767781
$(foreach host,$(CFG_HOST), \
@@ -901,6 +915,7 @@ TEST_GROUPS = \
901915
rpass \
902916
rpass-valgrind \
903917
rpass-full \
918+
rfail-full \
904919
cfail-full \
905920
rfail \
906921
cfail \
@@ -918,6 +933,7 @@ TEST_GROUPS = \
918933
pretty-rpass \
919934
pretty-rpass-valgrind \
920935
pretty-rpass-full \
936+
pretty-rfail-full \
921937
pretty-rfail \
922938
pretty-bench \
923939
pretty-pretty \

branches/snap-stage3/src/doc/reference.md

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ that does _not_ occur in the set of [keywords](#keywords).
8484
## Comments
8585

8686
Comments in Rust code follow the general C++ style of line (`//`) and
87-
block (`/* ... */`) comment forms. Nested block comments are supported.
87+
block-comment (`/* ... */`) forms. Nested block comments are supported.
8888

8989
Line comments beginning with exactly _three_ slashes (`///`), and block
9090
comments beginning with exactly one repeated asterisk in the block-open
@@ -192,13 +192,13 @@ which must be _escaped_ by a preceding `U+005C` character (`\`).
192192

193193
A _string literal_ is a sequence of any Unicode characters enclosed within two
194194
`U+0022` (double-quote) characters, with the exception of `U+0022` itself,
195-
which must be _escaped_ by a preceding `U+005C` character (`\`).
195+
which must be _escaped_ by a preceding `U+005C` character (`\`), or a _raw
196+
string literal_.
196197

197-
Line-break characters are allowed in string literals. Normally they represent
198-
themselves (i.e. no translation), but as a special exception, when a `U+005C`
199-
character (`\`) occurs immediately before the newline, the `U+005C` character,
200-
the newline, and all whitespace at the beginning of the next line are ignored.
201-
Thus `a` and `b` are equal:
198+
A multi-line string literal may be defined by terminating each line with a
199+
`U+005C` character (`\`) immediately before the newline. This causes the
200+
`U+005C` character, the newline, and all whitespace at the beginning of the
201+
next line to be ignored.
202202

203203
```rust
204204
let a = "foobar";
@@ -366,19 +366,11 @@ A _floating-point literal_ has one of two forms:
366366
optionally followed by another decimal literal, with an optional _exponent_.
367367
* A single _decimal literal_ followed by an _exponent_.
368368

369-
Like integer literals, a floating-point literal may be followed by a
370-
suffix, so long as the pre-suffix part does not end with `U+002E` (`.`).
371-
The suffix forcibly sets the type of the literal. There are two valid
369+
By default, a floating-point literal has a generic type, and, like integer
370+
literals, the type must be uniquely determined from the context. There are two valid
372371
_floating-point suffixes_, `f32` and `f64` (the 32-bit and 64-bit floating point
373372
types), which explicitly determine the type of the literal.
374373

375-
The type of an _unsuffixed_ floating-point literal is determined by type
376-
inference. If a floating-point type can be _uniquely_ determined from the
377-
surrounding program context, the unsuffixed floating-point literal has that type.
378-
If the program context underconstrains the type, it defaults to double-precision `f64`;
379-
if the program context overconstrains the type, it is considered a static type
380-
error.
381-
382374
Examples of floating-point literals of various forms:
383375

384376
```
@@ -2135,10 +2127,7 @@ The currently implemented features of the reference compiler are:
21352127
semantics are likely to change, so this macro usage must be opted
21362128
into.
21372129

2138-
* `associated_consts` - Allows constants to be defined in `impl` and `trait`
2139-
blocks, so that they can be associated with a type or
2140-
trait in a similar manner to methods and associated
2141-
types.
2130+
* `associated_types` - Allows type aliases in traits. Experimental.
21422131

21432132
* `box_patterns` - Allows `box` patterns, the exact semantics of which
21442133
is subject to change.

branches/snap-stage3/src/doc/trpl/const-and-static.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ unsafe {
6666
}
6767
```
6868

69-
[unsafe]: unsafe.html
70-
7169
Furthermore, any type stored in a `static` must be `Sync`.
7270

7371
# Initializing

branches/snap-stage3/src/doc/trpl/hello-cargo.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,6 @@ $ mkdir src
3232
$ mv main.rs src/main.rs
3333
```
3434

35-
Note that since we're creating an executable, we used `main.rs`. If we
36-
want to make a library instead, we should use `lib.rs`.
37-
Custom file locations for the entry point can be specified
38-
with a [`[[lib]]` or `[[bin]]`][crates-custom] key in the TOML file described below.
39-
40-
[crates-custom]: http://doc.crates.io/manifest.html#configuring-a-target
41-
4235
Cargo expects your source files to live inside a `src` directory. That leaves
4336
the top level for other things, like READMEs, license information, and anything
4437
not related to your code. Cargo helps us keep our projects nice and tidy. A

branches/snap-stage3/src/doc/trpl/vectors.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
% Vectors
22

33
A ‘vector’ is a dynamic or ‘growable’ array, implemented as the standard
4-
library type [`Vec<T>`][vec]. The `T` means that we can have vectors
5-
of any type (see the chapter on [generics][generic] for more).
6-
Vectors always allocate their data on the heap.
4+
library type [`Vec<T>`][vec]. That `<T>` is a [generic][generic], meaning we
5+
can have vectors of any type. Vectors always allocate their data on the heap.
76
You can create them with the `vec!` macro:
87

98
```rust

branches/snap-stage3/src/grammar/parser-lalr.y

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -505,20 +505,10 @@ trait_items
505505
;
506506

507507
trait_item
508-
: trait_const
509-
| trait_type
508+
: trait_type
510509
| trait_method
511510
;
512511

513-
trait_const
514-
: maybe_outer_attrs CONST ident maybe_const_default ';' { $$ = mk_node("ConstTraitItem", 3, $1, $3, $4); }
515-
;
516-
517-
maybe_const_default
518-
: '=' expr { $$ = mk_node("ConstDefault", 1, $2); }
519-
| %empty { $$ = mk_none(); }
520-
;
521-
522512
trait_type
523513
: maybe_outer_attrs TYPE ty_param ';' { $$ = mk_node("TypeTraitItem", 2, $1, $3); }
524514
;
@@ -621,16 +611,7 @@ impl_items
621611
impl_item
622612
: impl_method
623613
| item_macro
624-
| impl_const
625-
| impl_type
626-
;
627-
628-
impl_const
629-
: attrs_and_vis item_const { $$ = mk_node("ImplConst", 1, $1, $2); }
630-
;
631-
632-
impl_type
633-
: attrs_and_vis TYPE ident generic_params '=' ty_sum ';' { $$ = mk_node("ImplType", 4, $1, $3, $4, $6); }
614+
| trait_type
634615
;
635616

636617
item_fn

branches/snap-stage3/src/libcollections/string.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -951,13 +951,12 @@ impl<'a> Deref for DerefString<'a> {
951951
/// # #![feature(collections)]
952952
/// use std::string::as_string;
953953
///
954-
/// // Let's pretend we have a function that requires `&String`
955-
/// fn string_consumer(s: &String) {
956-
/// assert_eq!(s, "foo");
954+
/// fn string_consumer(s: String) {
955+
/// assert_eq!(s, "foo".to_string());
957956
/// }
958957
///
959-
/// // Provide a `&String` from a `&str` without allocating
960-
/// string_consumer(&as_string("foo"));
958+
/// let string = as_string("foo").clone();
959+
/// string_consumer(string);
961960
/// ```
962961
#[unstable(feature = "collections")]
963962
pub fn as_string<'a>(x: &'a str) -> DerefString<'a> {

branches/snap-stage3/src/libcollections/vec.rs

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,11 @@ static MAX_MEMORY_SIZE: usize = isize::MAX as usize;
116116
/// stack.push(2);
117117
/// stack.push(3);
118118
///
119-
/// while let Some(top) = stack.pop() {
119+
/// loop {
120+
/// let top = match stack.pop() {
121+
/// None => break, // empty
122+
/// Some(x) => x,
123+
/// };
120124
/// // Prints 3, 2, 1
121125
/// println!("{}", top);
122126
/// }
@@ -536,7 +540,7 @@ impl<T> Vec<T> {
536540
///
537541
/// # Panics
538542
///
539-
/// Panics if `index` is out of bounds.
543+
/// Panics if `i` is out of bounds.
540544
///
541545
/// # Examples
542546
///
@@ -1915,22 +1919,6 @@ impl<'a, T> Drop for DerefVec<'a, T> {
19151919
}
19161920

19171921
/// Converts a slice to a wrapper type providing a `&Vec<T>` reference.
1918-
///
1919-
/// # Examples
1920-
///
1921-
/// ```
1922-
/// # #![feature(collections)]
1923-
/// use std::vec::as_vec;
1924-
///
1925-
/// // Let's pretend we have a function that requires `&Vec<i32>`
1926-
/// fn vec_consumer(s: &Vec<i32>) {
1927-
/// assert_eq!(s, &[1, 2, 3]);
1928-
/// }
1929-
///
1930-
/// // Provide a `&Vec<i32>` from a `&[i32]` without allocating
1931-
/// let values = [1, 2, 3];
1932-
/// vec_consumer(&as_vec(&values));
1933-
/// ```
19341922
#[unstable(feature = "collections")]
19351923
pub fn as_vec<'a, T>(x: &'a [T]) -> DerefVec<'a, T> {
19361924
unsafe {

branches/snap-stage3/src/libcore/atomic.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,6 @@ pub struct AtomicPtr<T> {
129129
_marker: PhantomData<*mut T>,
130130
}
131131

132-
impl<T> Default for AtomicPtr<T> {
133-
fn default() -> AtomicPtr<T> {
134-
AtomicPtr::new(::ptr::null_mut())
135-
}
136-
}
137-
138132
unsafe impl<T> Sync for AtomicPtr<T> {}
139133

140134
/// Atomic memory orderings

branches/snap-stage3/src/libcore/cell.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ impl<T> RefCell<T> {
417417
///
418418
/// let result = thread::spawn(move || {
419419
/// let c = RefCell::new(5);
420-
/// let m = c.borrow();
420+
/// let m = c.borrow_mut();
421421
///
422422
/// let b = c.borrow_mut(); // this causes a panic
423423
/// }).join();

branches/snap-stage3/src/libcore/convert.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ pub trait Into<T>: Sized {
8383
/// `String` implements `From<&str>`:
8484
///
8585
/// ```
86+
/// let s = "hello";
8687
/// let string = "hello".to_string();
87-
/// let other_string = String::from("hello");
88+
///
89+
/// let other_string: String = From::from(s);
8890
///
8991
/// assert_eq!(string, other_string);
9092
/// ```

branches/snap-stage3/src/libcore/iter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ pub trait Iterator {
179179

180180
/// Creates an iterator that iterates over both this and the specified
181181
/// iterators simultaneously, yielding the two elements as pairs. When
182-
/// either iterator returns `None`, all further invocations of `next()`
183-
/// will return `None`.
182+
/// either iterator returns `None`, all further invocations of next() will
183+
/// return `None`.
184184
///
185185
/// # Examples
186186
///

0 commit comments

Comments
 (0)