Skip to content

Commit 0ed47dd

Browse files
committed
---
yaml --- r: 274326 b: refs/heads/stable c: fd4d013 h: refs/heads/master
1 parent 3525116 commit 0ed47dd

File tree

10 files changed

+20
-131
lines changed

10 files changed

+20
-131
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 1c06f64ac2a27c76eaf4352eacdd260a4a62c0ec
32+
refs/heads/stable: fd4d013a2ce394fc73e83d8c13459289de1d72ba
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/CONTRIBUTING.md

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ links to the major sections:
66

77
* [Feature Requests](#feature-requests)
88
* [Bug Reports](#bug-reports)
9-
* [The Build System](#the-build-system)
109
* [Pull Requests](#pull-requests)
1110
* [Writing Documentation](#writing-documentation)
1211
* [Issue Triage](#issue-triage)
@@ -78,66 +77,6 @@ to do this is to invoke `rustc` like this:
7877
$ RUST_BACKTRACE=1 rustc ...
7978
```
8079

81-
## The Build System
82-
83-
Rust's build system allows you to bootstrap the compiler, run tests &
84-
benchmarks, generate documentation, install a fresh build of Rust, and more.
85-
It's your best friend when working on Rust, allowing you to compile & test
86-
your contributions before submission.
87-
88-
All the configuration for the build system lives in [the `mk` directory][mkdir]
89-
in the project root. It can be hard to follow in places, as it uses some
90-
advanced Make features which make for some challenging reading. If you have
91-
questions on the build system internals, try asking in
92-
[`#rust-internals`][pound-rust-internals].
93-
94-
[mkdir]: https://github.com/rust-lang/rust/tree/master/mk/
95-
96-
### Configuration
97-
98-
Before you can start building the compiler you need to configure the build for
99-
your system. In most cases, that will just mean using the defaults provided
100-
for Rust. Configuring involves invoking the `configure` script in the project
101-
root.
102-
103-
```
104-
./configure
105-
```
106-
107-
There are large number of options accepted by this script to alter the
108-
configuration used later in the build process. Some options to note:
109-
110-
- `--enable-debug` - Build a debug version of the compiler (disables optimizations)
111-
- `--enable-optimize` - Enable optimizations (can be used with `--enable-debug`
112-
to make a debug build with optimizations)
113-
- `--disable-valgrind-rpass` - Don't run tests with valgrind
114-
- `--enable-clang` - Prefer clang to gcc for building dependencies (e.g., LLVM)
115-
- `--enable-ccache` - Invoke clang/gcc with ccache to re-use object files between builds
116-
- `--enable-compiler-docs` - Build compiler documentation
117-
118-
To see a full list of options, run `./configure --help`.
119-
120-
### Useful Targets
121-
122-
Some common make targets are:
123-
124-
- `make rustc-stage1` - build up to (and including) the first stage. For most
125-
cases we don't need to build the stage2 compiler, so we can save time by not
126-
building it. The stage1 compiler is a fully functioning compiler and
127-
(probably) will be enough to determine if your change works as expected.
128-
- `make check` - build the full compiler & run all tests (takes a while). This
129-
is what gets run by the continuous integration system against your pull
130-
request. You should run this before submitting to make sure your tests pass
131-
& everything builds in the correct manner.
132-
- `make check-stage1-std NO_REBUILD=1` - test the standard library without
133-
rebuilding the entire compiler
134-
- `make check TESTNAME=<path-to-test-file>.rs` - Run a single test file
135-
- `make check-stage1-rpass TESTNAME=<path-to-test-file>.rs` - Run a single
136-
rpass test with the stage1 compiler (this will be quicker than running the
137-
command above as we only build the stage1 compiler, not the entire thing).
138-
You can also leave off the `-rpass` to run all stage1 test types.
139-
- `make check-stage1-coretest` - Run stage1 tests in `libcore`.
140-
14180
## Pull Requests
14281

14382
Pull requests are the primary mechanism we use to change Rust. GitHub itself

branches/stable/src/doc/book/crates-and-modules.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -567,11 +567,10 @@ to it as "sayings". Similarly, the first `use` statement pulls in the
567567
`ja_greetings` as opposed to simply `greetings`. This can help to avoid
568568
ambiguity when importing similarly-named items from different places.
569569
570-
The second `use` statement uses a star glob to bring in all public symbols from
571-
the `sayings::japanese::farewells` module. As you can see we can later refer to
570+
The second `use` statement uses a star glob to bring in _all_ symbols from the
571+
`sayings::japanese::farewells` module. As you can see we can later refer to
572572
the Japanese `goodbye` function with no module qualifiers. This kind of glob
573-
should be used sparingly. It’s worth noting that it only imports the public
574-
symbols, even if the code doing the globbing is in the same module.
573+
should be used sparingly.
575574
576575
The third `use` statement bears more explanation. It's using "brace expansion"
577576
globbing to compress three `use` statements into one (this sort of syntax

branches/stable/src/doc/book/macros.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,9 @@ which syntactic form it matches.
478478

479479
There are additional rules regarding the next token after a metavariable:
480480

481-
* `expr` variables may only be followed by one of: `=> , ;`
482-
* `ty` and `path` variables may only be followed by one of: `=> , : = > as`
483-
* `pat` variables may only be followed by one of: `=> , = if in`
481+
* `expr` and `stmt` variables may only be followed by one of: `=> , ;`
482+
* `ty` and `path` variables may only be followed by one of: `=> , = | ; : > [ { as where`
483+
* `pat` variables may only be followed by one of: `=> , = | if in`
484484
* Other variables may be followed by any token.
485485

486486
These rules provide some flexibility for Rust’s syntax to evolve without

branches/stable/src/doc/book/syntax-index.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Keywords
44

5-
* `as`: primitive casting, or disambiguating the specific trait containing an item. See [Casting Between Types (`as`)], [Universal Function Call Syntax (Angle-bracket Form)], [Associated Types].
5+
* `as`: primitive casting. See [Casting Between Types (`as`)].
66
* `break`: break out of loop. See [Loops (Ending Iteration Early)].
77
* `const`: constant items and constant raw pointers. See [`const` and `static`], [Raw Pointers].
88
* `continue`: continue to next loop iteration. See [Loops (Ending Iteration Early)].
@@ -115,11 +115,8 @@
115115
* `::path`: path relative to the crate root (*i.e.* an explicitly absolute path). See [Crates and Modules (Re-exporting with `pub use`)].
116116
* `self::path`: path relative to the current module (*i.e.* an explicitly relative path). See [Crates and Modules (Re-exporting with `pub use`)].
117117
* `super::path`: path relative to the parent of the current module. See [Crates and Modules (Re-exporting with `pub use`)].
118-
* `type::ident`, `<type as trait>::ident`: associated constants, functions, and types. See [Associated Types].
118+
* `type::ident`: associated constants, functions, and types. See [Associated Types].
119119
* `<type>::…`: associated item for a type which cannot be directly named (*e.g.* `<&T>::…`, `<[T]>::…`, *etc.*). See [Associated Types].
120-
* `trait::method(…)`: disambiguating a method call by naming the trait which defines it. See [Universal Function Call Syntax].
121-
* `type::method(…)`: disambiguating a method call by naming the type for which it's defined. See [Universal Function Call Syntax].
122-
* `<type as trait>::method(…)`: disambiguating a method call by naming the trait _and_ type. See [Universal Function Call Syntax (Angle-bracket Form)].
123120

124121
<!-- Generics -->
125122

@@ -135,8 +132,7 @@
135132
<!-- Constraints -->
136133

137134
* `T: U`: generic parameter `T` constrained to types that implement `U`. See [Traits].
138-
* `T: 'a`: generic type `T` must outlive lifetime `'a`. When we say that a type 'outlives' the lifetime, we mean that it cannot transitively contain any references with lifetimes shorter than `'a`.
139-
* `T : 'static`: The generic type `T` contains no borrowed references other than `'static` ones.
135+
* `T: 'a`: generic type `T` must outlive lifetime `'a`.
140136
* `'b: 'a`: generic lifetime `'b` must outlive lifetime `'a`.
141137
* `T: ?Sized`: allow generic type parameter to be a dynamically-sized type. See [Unsized Types (`?Sized`)].
142138
* `'a + trait`, `trait + trait`: compound type constraint. See [Traits (Multiple Trait Bounds)].
@@ -238,8 +234,6 @@
238234
[Traits (`where` clause)]: traits.html#where-clause
239235
[Traits (Multiple Trait Bounds)]: traits.html#multiple-trait-bounds
240236
[Traits]: traits.html
241-
[Universal Function Call Syntax]: ufcs.html
242-
[Universal Function Call Syntax (Angle-bracket Form)]: ufcs.html#angle-bracket-form
243237
[Unsafe]: unsafe.html
244238
[Unsized Types (`?Sized`)]: unsized-types.html#sized
245239
[Variable Bindings]: variable-bindings.html

branches/stable/src/doc/reference.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2095,7 +2095,7 @@ along with their default settings. [Compiler
20952095
plugins](book/compiler-plugins.html#lint-plugins) can provide additional lint checks.
20962096

20972097
```{.ignore}
2098-
pub mod m1 {
2098+
mod m1 {
20992099
// Missing documentation is ignored here
21002100
#[allow(missing_docs)]
21012101
pub fn undocumented_one() -> i32 { 1 }
@@ -2115,9 +2115,9 @@ check on and off:
21152115

21162116
```{.ignore}
21172117
#[warn(missing_docs)]
2118-
pub mod m2{
2118+
mod m2{
21192119
#[allow(missing_docs)]
2120-
pub mod nested {
2120+
mod nested {
21212121
// Missing documentation is ignored here
21222122
pub fn undocumented_one() -> i32 { 1 }
21232123
@@ -2137,7 +2137,7 @@ that lint check:
21372137

21382138
```{.ignore}
21392139
#[forbid(missing_docs)]
2140-
pub mod m3 {
2140+
mod m3 {
21412141
// Attempting to toggle warning signals an error here
21422142
#[allow(missing_docs)]
21432143
/// Returns 2.

branches/stable/src/libcollections/btree/set.rs

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// to TreeMap
1313

1414
use core::cmp::Ordering::{self, Less, Greater, Equal};
15-
use core::cmp::{min, max};
1615
use core::fmt::Debug;
1716
use core::fmt;
1817
use core::iter::{Peekable, FromIterator};
@@ -704,9 +703,7 @@ impl<'a, T> DoubleEndedIterator for Iter<'a, T> {
704703
}
705704
}
706705
#[stable(feature = "rust1", since = "1.0.0")]
707-
impl<'a, T> ExactSizeIterator for Iter<'a, T> {
708-
fn len(&self) -> usize { self.iter.len() }
709-
}
706+
impl<'a, T> ExactSizeIterator for Iter<'a, T> {}
710707

711708

712709
#[stable(feature = "rust1", since = "1.0.0")]
@@ -727,9 +724,7 @@ impl<T> DoubleEndedIterator for IntoIter<T> {
727724
}
728725
}
729726
#[stable(feature = "rust1", since = "1.0.0")]
730-
impl<T> ExactSizeIterator for IntoIter<T> {
731-
fn len(&self) -> usize { self.iter.len() }
732-
}
727+
impl<T> ExactSizeIterator for IntoIter<T> {}
733728

734729

735730
impl<'a, T> Clone for Range<'a, T> {
@@ -785,12 +780,6 @@ impl<'a, T: Ord> Iterator for Difference<'a, T> {
785780
}
786781
}
787782
}
788-
789-
fn size_hint(&self) -> (usize, Option<usize>) {
790-
let a_len = self.a.len();
791-
let b_len = self.b.len();
792-
(a_len.saturating_sub(b_len), Some(a_len))
793-
}
794783
}
795784

796785
impl<'a, T> Clone for SymmetricDifference<'a, T> {
@@ -817,10 +806,6 @@ impl<'a, T: Ord> Iterator for SymmetricDifference<'a, T> {
817806
}
818807
}
819808
}
820-
821-
fn size_hint(&self) -> (usize, Option<usize>) {
822-
(0, Some(self.a.len() + self.b.len()))
823-
}
824809
}
825810

826811
impl<'a, T> Clone for Intersection<'a, T> {
@@ -857,10 +842,6 @@ impl<'a, T: Ord> Iterator for Intersection<'a, T> {
857842
}
858843
}
859844
}
860-
861-
fn size_hint(&self) -> (usize, Option<usize>) {
862-
(0, Some(min(self.a.len(), self.b.len())))
863-
}
864845
}
865846

866847
impl<'a, T> Clone for Union<'a, T> {
@@ -887,10 +868,4 @@ impl<'a, T: Ord> Iterator for Union<'a, T> {
887868
}
888869
}
889870
}
890-
891-
fn size_hint(&self) -> (usize, Option<usize>) {
892-
let a_len = self.a.len();
893-
let b_len = self.b.len();
894-
(max(a_len, b_len), Some(a_len + b_len))
895-
}
896871
}

branches/stable/src/libcollections/vec_deque.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,9 +1994,9 @@ impl<A: Ord> Ord for VecDeque<A> {
19941994
impl<A: Hash> Hash for VecDeque<A> {
19951995
fn hash<H: Hasher>(&self, state: &mut H) {
19961996
self.len().hash(state);
1997-
let (a, b) = self.as_slices();
1998-
Hash::hash_slice(a, state);
1999-
Hash::hash_slice(b, state);
1997+
for elt in self {
1998+
elt.hash(state);
1999+
}
20002000
}
20012001
}
20022002

branches/stable/src/libcollectionstest/vec_deque.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -605,25 +605,6 @@ fn test_hash() {
605605
assert!(::hash(&x) == ::hash(&y));
606606
}
607607

608-
#[test]
609-
fn test_hash_after_rotation() {
610-
// test that two deques hash equal even if elements are laid out differently
611-
let len = 28;
612-
let mut ring: VecDeque<i32> = (0..len as i32).collect();
613-
let orig = ring.clone();
614-
for _ in 0..ring.capacity() {
615-
// shift values 1 step to the right by pop, sub one, push
616-
ring.pop_front();
617-
for elt in &mut ring {
618-
*elt -= 1;
619-
}
620-
ring.push_back(len - 1);
621-
assert_eq!(::hash(&orig), ::hash(&ring));
622-
assert_eq!(orig, ring);
623-
assert_eq!(ring, orig);
624-
}
625-
}
626-
627608
#[test]
628609
fn test_ord() {
629610
let x = VecDeque::new();

branches/stable/src/libsyntax/ext/tt/macro_rules.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,7 @@ fn can_be_followed_by_any(frag: &str) -> bool {
972972
/// we expanded `expr` to include a new binary operator, we might
973973
/// break macros that were relying on that binary operator as a
974974
/// separator.
975+
// when changing this do not forget to update doc/book/macros.md!
975976
fn is_in_follow(_: &ExtCtxt, tok: &Token, frag: &str) -> Result<bool, String> {
976977
if let &CloseDelim(_) = tok {
977978
// closing a token tree can never be matched by any fragment;

0 commit comments

Comments
 (0)