Skip to content

Commit ff9d202

Browse files
committed
---
yaml --- r: 275284 b: refs/heads/stable c: 2352c1c h: refs/heads/master
1 parent e34e5dd commit ff9d202

File tree

15 files changed

+120
-115
lines changed

15 files changed

+120
-115
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: 54fdae3d6eb944c80fd2b0de3130ac0416d51bf0
32+
refs/heads/stable: 2352c1c5396681230d5ea5c99944e65ab673c3c8
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/RELEASES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ Libraries
7575
improved by using `memchr` to search for newlines][1.7m].
7676
* [`f32::to_degrees` and `f32::to_radians` are stable][1.7f]. The
7777
`f64` variants were stabilized previously.
78-
* [`BTreeMap` was rewritten to use less memory and improve the performance
79-
of insertion and iteration, the latter by as much as 5x`][1.7bm].
78+
* [`BTreeMap` was rewritten to use less memory improve performance of
79+
insertion and iteration, the latter by as much as 5x`][1.7bm].
8080
* [`BTreeSet` and its iterators, `Iter`, `IntoIter`, and `Range` are
8181
covariant over their contained type][1.7bt].
8282
* [`LinkedList` and its iterators, `Iter` and `IntoIter` are covariant

branches/stable/src/doc/book/const-and-static.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,16 @@ unsafe {
6464

6565
[unsafe]: unsafe.html
6666

67-
Furthermore, any type stored in a `static` must be `Sync`, and must not have
67+
Furthermore, any type stored in a `static` must be `Sync`, and may not have
6868
a [`Drop`][drop] implementation.
6969

7070
[drop]: drop.html
7171

7272
# Initializing
7373

74-
Both `const` and `static` have requirements for giving them a value. They must
75-
be given a value that’s a constant expression. In other words, you cannot use
76-
the result of a function call or anything similarly complex or at runtime.
74+
Both `const` and `static` have requirements for giving them a value. They may
75+
only be given a value that’s a constant expression. In other words, you cannot
76+
use the result of a function call or anything similarly complex or at runtime.
7777

7878
# Which construct should I use?
7979

branches/stable/src/doc/book/guessing-game.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -906,17 +906,17 @@ let guess: u32 = match guess.trim().parse() {
906906
Err(_) => continue,
907907
};
908908
```
909+
909910
This is how you generally move from ‘crash on error’ to ‘actually handle the
910-
error’, by switching from `expect()` to a `match` statement. A `Result` is
911-
returned by `parse()`, this is an `enum` like `Ordering`, but in this case,
912-
each variant has some data associated with it: `Ok` is a success, and `Err` is a
911+
error’, by switching from `expect()` to a `match` statement. The `Result`
912+
returned by `parse()` is an `enum` like `Ordering`, but in this case, each
913+
variant has some data associated with it: `Ok` is a success, and `Err` is a
913914
failure. Each contains more information: the successfully parsed integer, or an
914-
error type. In this case, we `match` on `Ok(num)`, which sets the name `num` to
915-
the unwrapped `Ok` value (ythe integer), and then we return it on the
916-
right-hand side. In the `Err` case, we don’t care what kind of error it is, so
917-
we just use the catch all `_` instead of a name. This catches everything that
918-
isn't `Ok`, and `continue` lets us move to the next iteration of the loop; in
919-
effect, this enables us to ignore all errors and continue with our program.
915+
error type. In this case, we `match` on `Ok(num)`, which sets the inner value
916+
of the `Ok` to the name `num`, and then we return it on the right-hand
917+
side. In the `Err` case, we don’t care what kind of error it is, so we
918+
use `_` instead of a name. This ignores the error, and `continue` causes us
919+
to go to the next iteration of the `loop`.
920920
921921
Now we should be good! Let’s try:
922922

branches/stable/src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3040,7 +3040,7 @@ the case of a `while` loop, the head is the conditional expression controlling
30403040
the loop. In the case of a `for` loop, the head is the call-expression
30413041
controlling the loop. If the label is present, then `continue 'foo` returns
30423042
control to the head of the loop with label `'foo`, which need not be the
3043-
innermost label enclosing the `continue` expression, but must enclose it.
3043+
innermost label enclosing the `break` expression, but must enclose it.
30443044

30453045
A `continue` expression is only permitted in the body of a loop.
30463046

branches/stable/src/libcollections/str.rs

Lines changed: 17 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,9 @@ impl str {
267267
/// Converts a string slice to a raw pointer.
268268
///
269269
/// As string slices are a slice of bytes, the raw pointer points to a
270-
/// [`u8`]. This pointer will be pointing to the first byte of the string
270+
/// `u8`. This pointer will be pointing to the first byte of the string
271271
/// slice.
272272
///
273-
/// [`u8`]: primitive.u8.html
274-
///
275273
/// # Examples
276274
///
277275
/// Basic usage:
@@ -663,7 +661,7 @@ impl str {
663661
/// assert_eq!(None, chars.next());
664662
/// ```
665663
///
666-
/// Remember, [`char`]s may not match your human intuition about characters:
664+
/// Remember, `char`s may not match your human intuition about characters:
667665
///
668666
/// ```
669667
/// let y = "y̆";
@@ -680,18 +678,16 @@ impl str {
680678
pub fn chars(&self) -> Chars {
681679
core_str::StrExt::chars(self)
682680
}
683-
/// Returns an iterator over the [`char`]s of a string slice, and their
681+
/// Returns an iterator over the `char`s of a string slice, and their
684682
/// positions.
685683
///
686684
/// As a string slice consists of valid UTF-8, we can iterate through a
687-
/// string slice by [`char`]. This method returns an iterator of both
688-
/// these [`char`]s, as well as their byte positions.
685+
/// string slice by `char`. This method returns an iterator of both
686+
/// these `char`s, as well as their byte positions.
689687
///
690-
/// The iterator yields tuples. The position is first, the [`char`] is
688+
/// The iterator yields tuples. The position is first, the `char` is
691689
/// second.
692690
///
693-
/// [`char`]: primitive.char.html
694-
///
695691
/// # Examples
696692
///
697693
/// Basic usage:
@@ -715,7 +711,7 @@ impl str {
715711
/// assert_eq!(None, char_indices.next());
716712
/// ```
717713
///
718-
/// Remember, [`char`]s may not match your human intuition about characters:
714+
/// Remember, `char`s may not match your human intuition about characters:
719715
///
720716
/// ```
721717
/// let y = "y̆";
@@ -922,13 +918,12 @@ impl str {
922918
/// Returns the byte index of the first character of this string slice that
923919
/// matches the pattern.
924920
///
925-
/// Returns [`None`] if the pattern doesn't match.
921+
/// Returns `None` if the pattern doesn't match.
926922
///
927923
/// The pattern can be a `&str`, [`char`], or a closure that determines if
928924
/// a character matches.
929925
///
930926
/// [`char`]: primitive.char.html
931-
/// [`None`]: option/enum.Option.html#variant.None
932927
///
933928
/// # Examples
934929
///
@@ -967,13 +962,12 @@ impl str {
967962
/// Returns the byte index of the last character of this string slice that
968963
/// matches the pattern.
969964
///
970-
/// Returns [`None`] if the pattern doesn't match.
965+
/// Returns `None` if the pattern doesn't match.
971966
///
972967
/// The pattern can be a `&str`, [`char`], or a closure that determines if
973968
/// a character matches.
974969
///
975970
/// [`char`]: primitive.char.html
976-
/// [`None`]: option/enum.Option.html#variant.None
977971
///
978972
/// # Examples
979973
///
@@ -1193,18 +1187,14 @@ impl str {
11931187
/// An iterator over substrings of `self`, separated by characters
11941188
/// matched by a pattern and yielded in reverse order.
11951189
///
1196-
/// The pattern can be a simple `&str`, [`char`], or a closure that
1190+
/// The pattern can be a simple `&str`, `char`, or a closure that
11971191
/// determines the split.
11981192
/// Additional libraries might provide more complex patterns like
11991193
/// regular expressions.
12001194
///
1201-
/// [`char`]: primitive.char.html
1202-
///
1203-
/// Equivalent to [`split()`], except that the trailing substring is
1195+
/// Equivalent to `split`, except that the trailing substring is
12041196
/// skipped if empty.
12051197
///
1206-
/// [`split()`]: #method.split
1207-
///
12081198
/// This method can be used for string data that is _terminated_,
12091199
/// rather than _separated_ by a pattern.
12101200
///
@@ -1467,7 +1457,7 @@ impl str {
14671457
/// # Iterator behavior
14681458
///
14691459
/// The returned iterator requires that the pattern supports a reverse
1470-
/// search, and it will be a [`DoubleEndedIterator`] if a forward/reverse
1460+
/// search, and it will be a `[DoubleEndedIterator]` if a forward/reverse
14711461
/// search yields the same elements.
14721462
///
14731463
/// [`DoubleEndedIterator`]: iter/trait.DoubleEndedIterator.html
@@ -1704,11 +1694,9 @@ impl str {
17041694
///
17051695
/// # Errors
17061696
///
1707-
/// Will return [`Err`] if it's not possible to parse this string slice into
1697+
/// Will return `Err` if it's not possible to parse this string slice into
17081698
/// the desired type.
17091699
///
1710-
/// [`Err`]: str/trait.FromStr.html#associatedtype.Err
1711-
///
17121700
/// # Example
17131701
///
17141702
/// Basic usage
@@ -1719,7 +1707,7 @@ impl str {
17191707
/// assert_eq!(4, four);
17201708
/// ```
17211709
///
1722-
/// Using the 'turbofish' instead of annotating `four`:
1710+
/// Using the 'turbofish' instead of annotationg `four`:
17231711
///
17241712
/// ```
17251713
/// let four = "4".parse::<u32>();
@@ -1777,13 +1765,11 @@ impl str {
17771765
result
17781766
}
17791767

1780-
/// Returns the lowercase equivalent of this string slice, as a new [`String`].
1768+
/// Returns the lowercase equivalent of this string slice, as a new `String`.
17811769
///
17821770
/// 'Lowercase' is defined according to the terms of the Unicode Derived Core Property
17831771
/// `Lowercase`.
17841772
///
1785-
/// [`String`]: string/struct.String.html
1786-
///
17871773
/// # Examples
17881774
///
17891775
/// Basic usage:
@@ -1853,13 +1839,11 @@ impl str {
18531839
}
18541840
}
18551841

1856-
/// Returns the uppercase equivalent of this string slice, as a new [`String`].
1842+
/// Returns the uppercase equivalent of this string slice, as a new `String`.
18571843
///
18581844
/// 'Uppercase' is defined according to the terms of the Unicode Derived Core Property
18591845
/// `Uppercase`.
18601846
///
1861-
/// [`String`]: string/struct.String.html
1862-
///
18631847
/// # Examples
18641848
///
18651849
/// Basic usage:
@@ -1900,9 +1884,7 @@ impl str {
19001884
self.chars().flat_map(|c| c.escape_unicode()).collect()
19011885
}
19021886

1903-
/// Converts a `Box<str>` into a [`String`] without copying or allocating.
1904-
///
1905-
/// [`String`]: string/struct.String.html
1887+
/// Converts a `Box<str>` into a `String` without copying or allocating.
19061888
///
19071889
/// # Examples
19081890
///

branches/stable/src/libcore/iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
//! ```
190190
//! let values = vec![1, 2, 3, 4, 5];
191191
//! {
192-
//! let result = match IntoIterator::into_iter(values) {
192+
//! let result = match values.into_iter() {
193193
//! mut iter => loop {
194194
//! match iter.next() {
195195
//! Some(x) => { println!("{}", x); },

branches/stable/src/librustc/lint/context.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,6 @@ impl<'a, 'tcx, 'v> hir_visit::Visitor<'v> for LateContext<'a, 'tcx> {
766766
self.with_lint_attrs(&it.attrs, |cx| {
767767
run_lints!(cx, check_foreign_item, late_passes, it);
768768
hir_visit::walk_foreign_item(cx, it);
769-
run_lints!(cx, check_foreign_item_post, late_passes, it);
770769
})
771770
}
772771

@@ -796,7 +795,6 @@ impl<'a, 'tcx, 'v> hir_visit::Visitor<'v> for LateContext<'a, 'tcx> {
796795
body: &'v hir::Block, span: Span, id: ast::NodeId) {
797796
run_lints!(self, check_fn, late_passes, fk, decl, body, span, id);
798797
hir_visit::walk_fn(self, fk, decl, body, span);
799-
run_lints!(self, check_fn_post, late_passes, fk, decl, body, span, id);
800798
}
801799

802800
fn visit_variant_data(&mut self,
@@ -837,7 +835,6 @@ impl<'a, 'tcx, 'v> hir_visit::Visitor<'v> for LateContext<'a, 'tcx> {
837835
fn visit_mod(&mut self, m: &hir::Mod, s: Span, n: ast::NodeId) {
838836
run_lints!(self, check_mod, late_passes, m, s, n);
839837
hir_visit::walk_mod(self, m);
840-
run_lints!(self, check_mod_post, late_passes, m, s, n);
841838
}
842839

843840
fn visit_local(&mut self, l: &hir::Local) {
@@ -877,7 +874,6 @@ impl<'a, 'tcx, 'v> hir_visit::Visitor<'v> for LateContext<'a, 'tcx> {
877874
run_lints!(cx, check_trait_item, late_passes, trait_item);
878875
cx.visit_ids(|v| v.visit_trait_item(trait_item));
879876
hir_visit::walk_trait_item(cx, trait_item);
880-
run_lints!(cx, check_trait_item_post, late_passes, trait_item);
881877
});
882878
}
883879

@@ -886,7 +882,6 @@ impl<'a, 'tcx, 'v> hir_visit::Visitor<'v> for LateContext<'a, 'tcx> {
886882
run_lints!(cx, check_impl_item, late_passes, impl_item);
887883
cx.visit_ids(|v| v.visit_impl_item(impl_item));
888884
hir_visit::walk_impl_item(cx, impl_item);
889-
run_lints!(cx, check_impl_item_post, late_passes, impl_item);
890885
});
891886
}
892887

@@ -933,7 +928,6 @@ impl<'a, 'v> ast_visit::Visitor<'v> for EarlyContext<'a> {
933928
self.with_lint_attrs(&it.attrs, |cx| {
934929
run_lints!(cx, check_foreign_item, early_passes, it);
935930
ast_visit::walk_foreign_item(cx, it);
936-
run_lints!(cx, check_foreign_item_post, early_passes, it);
937931
})
938932
}
939933

@@ -958,7 +952,6 @@ impl<'a, 'v> ast_visit::Visitor<'v> for EarlyContext<'a> {
958952
body: &'v ast::Block, span: Span, id: ast::NodeId) {
959953
run_lints!(self, check_fn, early_passes, fk, decl, body, span, id);
960954
ast_visit::walk_fn(self, fk, decl, body, span);
961-
run_lints!(self, check_fn_post, early_passes, fk, decl, body, span, id);
962955
}
963956

964957
fn visit_variant_data(&mut self,
@@ -999,7 +992,6 @@ impl<'a, 'v> ast_visit::Visitor<'v> for EarlyContext<'a> {
999992
fn visit_mod(&mut self, m: &ast::Mod, s: Span, n: ast::NodeId) {
1000993
run_lints!(self, check_mod, early_passes, m, s, n);
1001994
ast_visit::walk_mod(self, m);
1002-
run_lints!(self, check_mod_post, early_passes, m, s, n);
1003995
}
1004996

1005997
fn visit_local(&mut self, l: &ast::Local) {
@@ -1039,7 +1031,6 @@ impl<'a, 'v> ast_visit::Visitor<'v> for EarlyContext<'a> {
10391031
run_lints!(cx, check_trait_item, early_passes, trait_item);
10401032
cx.visit_ids(|v| v.visit_trait_item(trait_item));
10411033
ast_visit::walk_trait_item(cx, trait_item);
1042-
run_lints!(cx, check_trait_item_post, early_passes, trait_item);
10431034
});
10441035
}
10451036

@@ -1048,7 +1039,6 @@ impl<'a, 'v> ast_visit::Visitor<'v> for EarlyContext<'a> {
10481039
run_lints!(cx, check_impl_item, early_passes, impl_item);
10491040
cx.visit_ids(|v| v.visit_impl_item(impl_item));
10501041
ast_visit::walk_impl_item(cx, impl_item);
1051-
run_lints!(cx, check_impl_item_post, early_passes, impl_item);
10521042
});
10531043
}
10541044

branches/stable/src/librustc/lint/mod.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,7 @@ pub trait LateLintPass: LintPass {
134134
fn check_crate(&mut self, _: &LateContext, _: &hir::Crate) { }
135135
fn check_crate_post(&mut self, _: &LateContext, _: &hir::Crate) { }
136136
fn check_mod(&mut self, _: &LateContext, _: &hir::Mod, _: Span, _: ast::NodeId) { }
137-
fn check_mod_post(&mut self, _: &LateContext, _: &hir::Mod, _: Span, _: ast::NodeId) { }
138137
fn check_foreign_item(&mut self, _: &LateContext, _: &hir::ForeignItem) { }
139-
fn check_foreign_item_post(&mut self, _: &LateContext, _: &hir::ForeignItem) { }
140138
fn check_item(&mut self, _: &LateContext, _: &hir::Item) { }
141139
fn check_item_post(&mut self, _: &LateContext, _: &hir::Item) { }
142140
fn check_local(&mut self, _: &LateContext, _: &hir::Local) { }
@@ -152,12 +150,8 @@ pub trait LateLintPass: LintPass {
152150
fn check_generics(&mut self, _: &LateContext, _: &hir::Generics) { }
153151
fn check_fn(&mut self, _: &LateContext,
154152
_: FnKind, _: &hir::FnDecl, _: &hir::Block, _: Span, _: ast::NodeId) { }
155-
fn check_fn_post(&mut self, _: &LateContext,
156-
_: FnKind, _: &hir::FnDecl, _: &hir::Block, _: Span, _: ast::NodeId) { }
157153
fn check_trait_item(&mut self, _: &LateContext, _: &hir::TraitItem) { }
158-
fn check_trait_item_post(&mut self, _: &LateContext, _: &hir::TraitItem) { }
159154
fn check_impl_item(&mut self, _: &LateContext, _: &hir::ImplItem) { }
160-
fn check_impl_item_post(&mut self, _: &LateContext, _: &hir::ImplItem) { }
161155
fn check_struct_def(&mut self, _: &LateContext,
162156
_: &hir::VariantData, _: ast::Name, _: &hir::Generics, _: ast::NodeId) { }
163157
fn check_struct_def_post(&mut self, _: &LateContext,
@@ -185,9 +179,7 @@ pub trait EarlyLintPass: LintPass {
185179
fn check_crate(&mut self, _: &EarlyContext, _: &ast::Crate) { }
186180
fn check_crate_post(&mut self, _: &EarlyContext, _: &ast::Crate) { }
187181
fn check_mod(&mut self, _: &EarlyContext, _: &ast::Mod, _: Span, _: ast::NodeId) { }
188-
fn check_mod_post(&mut self, _: &EarlyContext, _: &ast::Mod, _: Span, _: ast::NodeId) { }
189182
fn check_foreign_item(&mut self, _: &EarlyContext, _: &ast::ForeignItem) { }
190-
fn check_foreign_item_post(&mut self, _: &EarlyContext, _: &ast::ForeignItem) { }
191183
fn check_item(&mut self, _: &EarlyContext, _: &ast::Item) { }
192184
fn check_item_post(&mut self, _: &EarlyContext, _: &ast::Item) { }
193185
fn check_local(&mut self, _: &EarlyContext, _: &ast::Local) { }
@@ -203,12 +195,8 @@ pub trait EarlyLintPass: LintPass {
203195
fn check_generics(&mut self, _: &EarlyContext, _: &ast::Generics) { }
204196
fn check_fn(&mut self, _: &EarlyContext,
205197
_: ast_visit::FnKind, _: &ast::FnDecl, _: &ast::Block, _: Span, _: ast::NodeId) { }
206-
fn check_fn_post(&mut self, _: &EarlyContext,
207-
_: ast_visit::FnKind, _: &ast::FnDecl, _: &ast::Block, _: Span, _: ast::NodeId) { }
208198
fn check_trait_item(&mut self, _: &EarlyContext, _: &ast::TraitItem) { }
209-
fn check_trait_item_post(&mut self, _: &EarlyContext, _: &ast::TraitItem) { }
210199
fn check_impl_item(&mut self, _: &EarlyContext, _: &ast::ImplItem) { }
211-
fn check_impl_item_post(&mut self, _: &EarlyContext, _: &ast::ImplItem) { }
212200
fn check_struct_def(&mut self, _: &EarlyContext,
213201
_: &ast::VariantData, _: ast::Ident, _: &ast::Generics, _: ast::NodeId) { }
214202
fn check_struct_def_post(&mut self, _: &EarlyContext,

0 commit comments

Comments
 (0)