Skip to content

Commit b9f0257

Browse files
author
Robin Kruppe
committed
---
yaml --- r: 274898 b: refs/heads/stable c: 3e34519 h: refs/heads/master
1 parent f74e992 commit b9f0257

File tree

24 files changed

+44
-138
lines changed

24 files changed

+44
-138
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: 5c835e9389d3c8dc6c6a054366cdb21843b7e3e5
32+
refs/heads/stable: 3e345191418230f1aa5b5f4cac9e5bf24e3572e4
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
*.elc
1818
*.epub
1919
*.exe
20-
*.pdb
2120
*.fn
2221
*.html
2322
*.kdev4

branches/stable/mk/cfg/i586-unknown-linux-gnu.mk

Lines changed: 0 additions & 23 deletions
This file was deleted.

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,6 @@ use std::sync::mpsc;
286286
fn main() {
287287
let data = Arc::new(Mutex::new(0));
288288

289-
// `tx` is the "transmitter" or "sender"
290-
// `rx` is the "receiver"
291289
let (tx, rx) = mpsc::channel();
292290

293291
for _ in 0..10 {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,23 +319,23 @@ our source code:
319319
```text
320320
First, we set `x` to five:
321321
322-
```rust
322+
```text
323323
let x = 5;
324324
# let y = 6;
325325
# println!("{}", x + y);
326326
```
327327
328328
Next, we set `y` to six:
329329
330-
```rust
330+
```text
331331
# let x = 5;
332332
let y = 6;
333333
# println!("{}", x + y);
334334
```
335335
336336
Finally, we print the sum of `x` and `y`:
337337
338-
```rust
338+
```text
339339
# let x = 5;
340340
# let y = 6;
341341
println!("{}", x + y);

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,10 @@ fn foo() {
5151
}
5252
```
5353

54-
When `v` comes into scope, a new [vector] is created on [the stack][stack],
55-
and it allocates space on [the heap][heap] for its elements. When `v` goes out
56-
of scope at the end of `foo()`, Rust will clean up everything related to the
57-
vector, even the heap-allocated memory. This happens deterministically, at the
58-
end of the scope.
54+
When `v` comes into scope, a new [vector] is created, and it allocates space on
55+
[the heap][heap] for each of its elements. When `v` goes out of scope at the
56+
end of `foo()`, Rust will clean up everything related to the vector, even the
57+
heap-allocated memory. This happens deterministically, at the end of the scope.
5958

6059
We'll cover [vectors] in detail later in this chapter; we only use them
6160
here as an example of a type that allocates space on the heap at runtime. They
@@ -68,7 +67,6 @@ Vectors have a [generic type][generics] `Vec<T>`, so in this example `v` will ha
6867
[arrays]: primitive-types.html#arrays
6968
[vectors]: vectors.html
7069
[heap]: the-stack-and-the-heap.html
71-
[stack]: the-stack-and-the-heap.html#the-stack
7270
[bindings]: variable-bindings.html
7371
[generics]: generics.html
7472

branches/stable/src/doc/book/using-rust-without-the-standard-library.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ don’t want to use the standard library via an attribute: `#![no_std]`.
1111
> For details on binaries without the standard library, see [the nightly
1212
> chapter on `#![no_std]`](no-stdlib.html)
1313
14-
To use `#![no_std]`, add it to your crate root:
14+
To use `#![no_std]`, add a it to your crate root:
1515

1616
```rust
1717
#![no_std]

branches/stable/src/doc/uptack.tex

Lines changed: 0 additions & 2 deletions
This file was deleted.

branches/stable/src/libcollections/vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ impl<T> Vec<T> {
528528
}
529529

530530
/// Inserts an element at position `index` within the vector, shifting all
531-
/// elements after it to the right.
531+
/// elements after position `i` one position to the right.
532532
///
533533
/// # Panics
534534
///
@@ -570,7 +570,7 @@ impl<T> Vec<T> {
570570
}
571571

572572
/// Removes and returns the element at position `index` within the vector,
573-
/// shifting all elements after it to the left.
573+
/// shifting all elements after position `index` one position to the left.
574574
///
575575
/// # Panics
576576
///

branches/stable/src/libcore/num/mod.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -741,13 +741,6 @@ macro_rules! int_impl {
741741
/// where `mask` removes any high-order bits of `rhs` that
742742
/// would cause the shift to exceed the bitwidth of the type.
743743
///
744-
/// Note that this is *not* the same as a rotate-left; the
745-
/// RHS of a wrapping shift-left is restricted to the range
746-
/// of the type, rather than the bits shifted out of the LHS
747-
/// being returned to the other end. The primitive integer
748-
/// types all implement a `rotate_left` function, which may
749-
/// be what you want instead.
750-
///
751744
/// # Examples
752745
///
753746
/// Basic usage:
@@ -766,13 +759,6 @@ macro_rules! int_impl {
766759
/// where `mask` removes any high-order bits of `rhs` that
767760
/// would cause the shift to exceed the bitwidth of the type.
768761
///
769-
/// Note that this is *not* the same as a rotate-right; the
770-
/// RHS of a wrapping shift-right is restricted to the range
771-
/// of the type, rather than the bits shifted out of the LHS
772-
/// being returned to the other end. The primitive integer
773-
/// types all implement a `rotate_right` function, which may
774-
/// be what you want instead.
775-
///
776762
/// # Examples
777763
///
778764
/// Basic usage:

branches/stable/src/librustc_back/target/i586_unknown_linux_gnu.rs

Lines changed: 0 additions & 28 deletions
This file was deleted.

branches/stable/src/librustc_back/target/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ macro_rules! supported_targets {
8989
supported_targets! {
9090
("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
9191
("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
92-
("i586-unknown-linux-gnu", i586_unknown_linux_gnu),
9392
("mips-unknown-linux-gnu", mips_unknown_linux_gnu),
9493
("mipsel-unknown-linux-gnu", mipsel_unknown_linux_gnu),
9594
("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu),

branches/stable/src/librustdoc/clean/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,8 +1281,10 @@ impl Clean<Item> for hir::ImplItem {
12811281
fn clean(&self, cx: &DocContext) -> Item {
12821282
let inner = match self.node {
12831283
hir::ImplItemKind::Const(ref ty, ref expr) => {
1284-
AssociatedConstItem(ty.clean(cx),
1285-
Some(expr.span.to_src(cx)))
1284+
ConstantItem(Constant{
1285+
type_: ty.clean(cx),
1286+
expr: expr.span.to_src(cx),
1287+
})
12861288
}
12871289
hir::ImplItemKind::Method(ref sig, _) => {
12881290
MethodItem(sig.clean(cx))

branches/stable/src/librustdoc/html/render.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,8 +1653,8 @@ fn shorter<'a>(s: Option<&'a str>) -> String {
16531653

16541654
#[inline]
16551655
fn plain_summary_line(s: Option<&str>) -> String {
1656-
let md = markdown::plain_summary_line(s.unwrap_or(""));
1657-
shorter(Some(&md)).replace("\n", " ")
1656+
let line = shorter(s).replace("\n", " ");
1657+
markdown::plain_summary_line(&line[..])
16581658
}
16591659

16601660
fn document(w: &mut fmt::Formatter, cx: &Context, item: &clean::Item) -> fmt::Result {
@@ -1781,7 +1781,6 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context,
17811781
} else {
17821782
String::new()
17831783
};
1784-
let doc_value = myitem.doc_value().unwrap_or("");
17851784
try!(write!(w, "
17861785
<tr class='{stab} module-item'>
17871786
<td><a class='{class}' href='{href}'
@@ -1793,7 +1792,7 @@ fn item_module(w: &mut fmt::Formatter, cx: &Context,
17931792
",
17941793
name = *myitem.name.as_ref().unwrap(),
17951794
stab_docs = stab_docs,
1796-
docs = shorter(Some(&Markdown(doc_value).to_string())),
1795+
docs = Markdown(&shorter(myitem.doc_value())),
17971796
class = shortty(myitem),
17981797
stab = myitem.stability_class(),
17991798
href = item_path(myitem),
@@ -2551,25 +2550,25 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
25512550
}
25522551
}
25532552
clean::TypedefItem(ref tydef, _) => {
2554-
let id = derive_id(format!("associatedtype.{}", name));
2553+
let id = derive_id(format!("assoc_type.{}", name));
25552554
try!(write!(w, "<h4 id='{}' class='{}'><code>", id, shortty(item)));
25562555
try!(write!(w, "type {} = {}", name, tydef.type_));
25572556
try!(write!(w, "</code></h4>\n"));
25582557
}
25592558
clean::AssociatedConstItem(ref ty, ref default) => {
2560-
let id = derive_id(format!("associatedconstant.{}", name));
2559+
let id = derive_id(format!("assoc_const.{}", name));
25612560
try!(write!(w, "<h4 id='{}' class='{}'><code>", id, shortty(item)));
25622561
try!(assoc_const(w, item, ty, default.as_ref()));
25632562
try!(write!(w, "</code></h4>\n"));
25642563
}
25652564
clean::ConstantItem(ref c) => {
2566-
let id = derive_id(format!("associatedconstant.{}", name));
2565+
let id = derive_id(format!("assoc_const.{}", name));
25672566
try!(write!(w, "<h4 id='{}' class='{}'><code>", id, shortty(item)));
25682567
try!(assoc_const(w, item, &c.type_, Some(&c.expr)));
25692568
try!(write!(w, "</code></h4>\n"));
25702569
}
25712570
clean::AssociatedTypeItem(ref bounds, ref default) => {
2572-
let id = derive_id(format!("associatedtype.{}", name));
2571+
let id = derive_id(format!("assoc_type.{}", name));
25732572
try!(write!(w, "<h4 id='{}' class='{}'><code>", id, shortty(item)));
25742573
try!(assoc_type(w, item, bounds, default));
25752574
try!(write!(w, "</code></h4>\n"));

branches/stable/src/libstd/ascii.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub trait AsciiExt {
4545
#[stable(feature = "rust1", since = "1.0.0")]
4646
type Owned;
4747

48-
/// Checks if the value is within the ASCII range.
48+
/// Checks if within the ASCII range.
4949
///
5050
/// # Examples
5151
///
@@ -55,8 +55,8 @@ pub trait AsciiExt {
5555
/// let ascii = 'a';
5656
/// let utf8 = '❤';
5757
///
58-
/// assert!(ascii.is_ascii());
59-
/// assert!(!utf8.is_ascii());
58+
/// assert_eq!(true, ascii.is_ascii());
59+
/// assert_eq!(false, utf8.is_ascii())
6060
/// ```
6161
#[stable(feature = "rust1", since = "1.0.0")]
6262
fn is_ascii(&self) -> bool;
@@ -114,9 +114,9 @@ pub trait AsciiExt {
114114
/// let ascii3 = 'A';
115115
/// let ascii4 = 'z';
116116
///
117-
/// assert!(ascii1.eq_ignore_ascii_case(&ascii2));
118-
/// assert!(ascii1.eq_ignore_ascii_case(&ascii3));
119-
/// assert!(!ascii1.eq_ignore_ascii_case(&ascii4));
117+
/// assert_eq!(true, ascii1.eq_ignore_ascii_case(&ascii2));
118+
/// assert_eq!(true, ascii1.eq_ignore_ascii_case(&ascii3));
119+
/// assert_eq!(false, ascii1.eq_ignore_ascii_case(&ascii4));
120120
/// ```
121121
#[stable(feature = "rust1", since = "1.0.0")]
122122
fn eq_ignore_ascii_case(&self, other: &Self) -> bool;

branches/stable/src/libstd/macros.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,9 @@ pub mod builtin {
269269
/// This macro takes any number of comma-separated identifiers, and
270270
/// concatenates them all into one, yielding an expression which is a new
271271
/// identifier. Note that hygiene makes it such that this macro cannot
272-
/// capture local variables. Also, as a general rule, macros are only
273-
/// allowed in item, statement or expression position. That means while
274-
/// you may use this macro for referring to existing variables, functions or
275-
/// modules etc, you cannot define a new one with it.
272+
/// capture local variables, and macros are only allowed in item,
273+
/// statement or expression position, meaning this macro may be difficult to
274+
/// use in some situations.
276275
///
277276
/// # Examples
278277
///
@@ -284,8 +283,6 @@ pub mod builtin {
284283
///
285284
/// let f = concat_idents!(foo, bar);
286285
/// println!("{}", f());
287-
///
288-
/// // fn concat_idents!(new, fun, name) { } // not usable in this way!
289286
/// # }
290287
/// ```
291288
#[stable(feature = "rust1", since = "1.0.0")]

branches/stable/src/libstd/prelude/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
//! * [`std::marker`]::{[`Copy`], [`Send`], [`Sized`], [`Sync`]}. The marker
5656
//! traits indicate fundamental properties of types.
5757
//! * [`std::ops`]::{[`Drop`], [`Fn`], [`FnMut`], [`FnOnce`]}. Various
58-
//! operations for both destructors and overloading `()`.
58+
//! operations for both destuctors and overloading `()`.
5959
//! * [`std::mem`]::[`drop`], a convenience function for explicitly dropping a
6060
//! value.
6161
//! * [`std::boxed`]::[`Box`], a way to allocate values on the heap.

branches/stable/src/libstd/sys/common/poison.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl<T> fmt::Display for PoisonError<T> {
111111
}
112112

113113
#[stable(feature = "rust1", since = "1.0.0")]
114-
impl<T: Reflect> Error for PoisonError<T> {
114+
impl<T: Send + Reflect> Error for PoisonError<T> {
115115
fn description(&self) -> &str {
116116
"poisoned lock: another task failed inside"
117117
}
@@ -158,17 +158,14 @@ impl<T> fmt::Debug for TryLockError<T> {
158158
}
159159

160160
#[stable(feature = "rust1", since = "1.0.0")]
161-
impl<T> fmt::Display for TryLockError<T> {
161+
impl<T: Send + Reflect> fmt::Display for TryLockError<T> {
162162
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
163-
match *self {
164-
TryLockError::Poisoned(..) => "poisoned lock: another task failed inside",
165-
TryLockError::WouldBlock => "try_lock failed because the operation would block"
166-
}.fmt(f)
163+
self.description().fmt(f)
167164
}
168165
}
169166

170167
#[stable(feature = "rust1", since = "1.0.0")]
171-
impl<T: Reflect> Error for TryLockError<T> {
168+
impl<T: Send + Reflect> Error for TryLockError<T> {
172169
fn description(&self) -> &str {
173170
match *self {
174171
TryLockError::Poisoned(ref p) => p.description(),

branches/stable/src/libsyntax/codemap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ impl MultiSpan {
341341
for idx in 0.. {
342342
if let Some(sp_trim) = sp.trim_start(prev) {
343343
// Implies `sp.hi > prev.hi`
344-
let cur = match self.spans.get(idx) {
344+
let cur = match self.spans.as_slice().get(idx) {
345345
Some(s) => *s,
346346
None => {
347347
sp = sp_trim;

branches/stable/src/test/run-make/codegen-options-parsing/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ all:
2525

2626
# Should not link dead code...
2727
$(RUSTC) -Z print-link-args dummy.rs 2>&1 | \
28-
grep -e '--gc-sections' -e '-dead_strip' -e '/OPT:REF,ICF'
28+
grep -e '--gc-sections\|-dead_strip\|/OPT:REF,ICF'
2929
# ... unless you specifically ask to keep it
3030
$(RUSTC) -Z print-link-args -C link-dead-code dummy.rs 2>&1 | \
31-
(! grep -e '--gc-sections' -e '-dead_strip' -e '/OPT:REF,ICF')
31+
(! grep -e '--gc-sections\|-dead_strip\|/OPT:REF,ICF')

branches/stable/src/test/rustdoc/assoc-consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub trait Foo {
2020
pub struct Bar;
2121

2222
impl Bar {
23-
// @has assoc_consts/struct.Bar.html '//*[@id="associatedconstant.BAR"]' \
23+
// @has assoc_consts/struct.Bar.html '//*[@id="assoc_const.BAR"]' \
2424
// 'const BAR: usize = 3'
2525
pub const BAR: usize = 3;
2626
}

branches/stable/src/test/rustdoc/issue-21092.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
extern crate issue_21092;
1515

1616
// @has issue_21092/struct.Bar.html
17-
// @has - '//*[@id="associatedtype.Bar"]' 'type Bar = i32'
17+
// @has - '//*[@id="assoc_type.Bar"]' 'type Bar = i32'
1818
pub use issue_21092::{Foo, Bar};

0 commit comments

Comments
 (0)