Skip to content

Commit 899109e

Browse files
committed
---
yaml --- r: 235995 b: refs/heads/stable c: 798ce50 h: refs/heads/master i: 235993: 699eaf8 235991: 52eb315 v: v3
1 parent 5f1c2d6 commit 899109e

File tree

201 files changed

+7796
-1783
lines changed

Some content is hidden

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

201 files changed

+7796
-1783
lines changed

[refs]

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

branches/stable/.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
*.rs rust
77
src/etc/pkg/rust-logo.ico binary
88
src/etc/pkg/rust-logo.png binary
9+
src/rt/msvc/* -whitespace
10+
src/rt/valgrind/* -whitespace
911
*.woff binary

branches/stable/configure

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,9 +1005,11 @@ then
10051005
(''|*clang)
10061006
CFG_CLANG_REPORTED_VERSION=$($CFG_CC --version | grep version)
10071007

1008-
if echo $CFG_CLANG_REPORTED_VERSION | grep -q "(based on LLVM "; then
1008+
if [[ $CFG_CLANG_REPORTED_VERSION == *"(based on LLVM "* ]]
1009+
then
10091010
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*(based on LLVM \(.*\))/\1/')
1010-
elif echo $CFG_CLANG_REPORTED_VERSION | grep -q "Apple LLVM"; then
1011+
elif [[ $CFG_CLANG_REPORTED_VERSION == "Apple LLVM"* ]]
1012+
then
10111013
CFG_OSX_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')
10121014
else
10131015
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')

branches/stable/src/doc/trpl/choosing-your-guarantees.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ allowed to share references to this by the regular borrowing rules, checked at c
4242

4343
## `&T` and `&mut T`
4444

45-
These are immutable and mutable references respectively. They follow the “read-write lock”
45+
These are immutable and mutable references respectively. They follow the &lquo;read-write lock&rquo;
4646
pattern, such that one may either have only one mutable reference to some data, or any number of
4747
immutable ones, but not both. This guarantee is enforced at compile time, and has no visible cost at
4848
runtime. In most cases these two pointer types suffice for sharing cheap references between sections
@@ -108,7 +108,7 @@ increment the inner reference count and return a copy of the `Rc<T>`.
108108

109109
# Cell types
110110

111-
`Cell`s provide interior mutability. In other words, they contain data which can be manipulated even
111+
&lquo;Cell&rquo;s provide interior mutability. In other words, they contain data which can be manipulated even
112112
if the type cannot be obtained in a mutable form (for example, when it is behind an `&`-ptr or
113113
`Rc<T>`).
114114

@@ -127,8 +127,7 @@ If a field is wrapped in `Cell`, it's a nice indicator that the chunk of data is
127127
stay the same between the time you first read it and when you intend to use it.
128128

129129
```rust
130-
use std::cell::Cell;
131-
130+
# use std::cell::Cell;
132131
let x = Cell::new(1);
133132
let y = &x;
134133
let z = &x;
@@ -186,8 +185,7 @@ any other borrows active when a mutable borrow is active. If the programmer atte
186185
borrow, the thread will panic.
187186

188187
```rust
189-
use std::cell::RefCell;
190-
188+
# use std::cell::RefCell;
191189
let x = RefCell::new(vec![1,2,3,4]);
192190
{
193191
println!("{:?}", *x.borrow())

branches/stable/src/doc/trpl/compiler-plugins.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
6161
("I", 1)];
6262
6363
let text = match args {
64-
[TtToken(_, token::Ident(s, _))] => s.to_string(),
64+
[TtToken(_, token::Ident(s, _))] => token::get_ident(s).to_string(),
6565
_ => {
6666
cx.span_err(sp, "argument should be a single identifier");
6767
return DummyResult::any(sp);
@@ -186,7 +186,8 @@ impl LintPass for Pass {
186186
}
187187
188188
fn check_item(&mut self, cx: &Context, it: &ast::Item) {
189-
if it.ident.name == "lintme" {
189+
let name = token::get_ident(it.ident);
190+
if name.get() == "lintme" {
190191
cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'");
191192
}
192193
}

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,10 +355,6 @@ Hello in English: Hello!
355355
Goodbye in English: Goodbye.
356356
```
357357
358-
`pub` also applies to `struct`s and their member fields. In keeping with Rust’s
359-
tendency toward safety, simply making a `struct` public won't automatically
360-
make its members public: you must mark the fields individually with `pub`.
361-
362358
Now that our functions are public, we can use them. Great! However, typing out
363359
`phrases::english::greetings::hello()` is very long and repetitive. Rust has
364360
another keyword for importing names into the current scope, so that you can
@@ -521,6 +517,9 @@ of `foo` relative to where we are. If that’s prefixed with `::`, as in
521517
`::foo::bar()`, it refers to a different `foo`, an absolute path from your
522518
crate root.
523519
520+
Also, note that we `pub use`d before we declared our `mod`s. Rust requires that
521+
`use` declarations go first.
522+
524523
This will build and run:
525524
526525
```bash

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ generator, which is local to the particular [thread][concurrency] of execution
499499
we’re in. Because we `use rand::Rng`’d above, it has a `gen_range()` method
500500
available. This method takes two arguments, and generates a number between
501501
them. It’s inclusive on the lower bound, but exclusive on the upper bound,
502-
so we need `1` and `101` to get a number ranging from one to a hundred.
502+
so we need `1` and `101` to get a number between one and a hundred.
503503

504504
[concurrency]: concurrency.html
505505

branches/stable/src/doc/trpl/intrinsics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ perform efficient pointer arithmetic, one would import those functions
1111
via a declaration like
1212

1313
```rust
14-
#![feature(intrinsics)]
14+
# #![feature(intrinsics)]
1515
# fn main() {}
1616

1717
extern "rust-intrinsic" {

branches/stable/src/liballoc/arc.rs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ impl<T: ?Sized> Arc<T> {
200200
/// # Examples
201201
///
202202
/// ```
203-
/// #![feature(arc_weak)]
204-
///
203+
/// # #![feature(arc_weak)]
205204
/// use std::sync::Arc;
206205
///
207206
/// let five = Arc::new(5);
@@ -338,8 +337,7 @@ impl<T: Clone> Arc<T> {
338337
/// # Examples
339338
///
340339
/// ```
341-
/// #![feature(arc_unique)]
342-
///
340+
/// # #![feature(arc_unique)]
343341
/// use std::sync::Arc;
344342
///
345343
/// let mut five = Arc::new(5);
@@ -410,8 +408,7 @@ impl<T: ?Sized> Arc<T> {
410408
/// # Examples
411409
///
412410
/// ```
413-
/// #![feature(arc_unique, alloc)]
414-
///
411+
/// # #![feature(arc_unique, alloc)]
415412
/// extern crate alloc;
416413
/// # fn main() {
417414
/// use alloc::arc::Arc;
@@ -558,8 +555,7 @@ impl<T: ?Sized> Weak<T> {
558555
/// # Examples
559556
///
560557
/// ```
561-
/// #![feature(arc_weak)]
562-
///
558+
/// # #![feature(arc_weak)]
563559
/// use std::sync::Arc;
564560
///
565561
/// let five = Arc::new(5);
@@ -603,8 +599,7 @@ impl<T: ?Sized> Clone for Weak<T> {
603599
/// # Examples
604600
///
605601
/// ```
606-
/// #![feature(arc_weak)]
607-
///
602+
/// # #![feature(arc_weak)]
608603
/// use std::sync::Arc;
609604
///
610605
/// let weak_five = Arc::new(5).downgrade();
@@ -631,8 +626,7 @@ impl<T: ?Sized> Drop for Weak<T> {
631626
/// # Examples
632627
///
633628
/// ```
634-
/// #![feature(arc_weak)]
635-
///
629+
/// # #![feature(arc_weak)]
636630
/// use std::sync::Arc;
637631
///
638632
/// {

branches/stable/src/liballoc/boxed.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ use core::raw::{TraitObject};
7575
/// The following two examples are equivalent:
7676
///
7777
/// ```
78-
/// #![feature(box_heap)]
79-
///
78+
/// # #![feature(box_heap)]
8079
/// #![feature(box_syntax, placement_in_syntax)]
8180
/// use std::boxed::HEAP;
8281
///
@@ -242,8 +241,7 @@ impl<T : ?Sized> Box<T> {
242241
///
243242
/// # Examples
244243
/// ```
245-
/// #![feature(box_raw)]
246-
///
244+
/// # #![feature(box_raw)]
247245
/// let seventeen = Box::new(17u32);
248246
/// let raw = Box::into_raw(seventeen);
249247
/// let boxed_again = unsafe { Box::from_raw(raw) };
@@ -266,8 +264,7 @@ impl<T : ?Sized> Box<T> {
266264
///
267265
/// # Examples
268266
/// ```
269-
/// #![feature(box_raw)]
270-
///
267+
/// # #![feature(box_raw)]
271268
/// use std::boxed;
272269
///
273270
/// let seventeen = Box::new(17u32);
@@ -310,8 +307,7 @@ impl<T: Clone> Clone for Box<T> {
310307
/// # Examples
311308
///
312309
/// ```
313-
/// #![feature(box_raw)]
314-
///
310+
/// # #![feature(box_raw)]
315311
/// let x = Box::new(5);
316312
/// let mut y = Box::new(10);
317313
///

branches/stable/src/liballoc/rc.rs

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@
9191
//! documentation for more details on interior mutability.
9292
//!
9393
//! ```rust
94-
//! #![feature(rc_weak)]
95-
//!
94+
//! # #![feature(rc_weak)]
9695
//! use std::rc::Rc;
9796
//! use std::rc::Weak;
9897
//! use std::cell::RefCell;
@@ -228,8 +227,7 @@ impl<T> Rc<T> {
228227
/// # Examples
229228
///
230229
/// ```
231-
/// #![feature(rc_unique)]
232-
///
230+
/// # #![feature(rc_unique)]
233231
/// use std::rc::Rc;
234232
///
235233
/// let x = Rc::new(3);
@@ -264,8 +262,7 @@ impl<T: ?Sized> Rc<T> {
264262
/// # Examples
265263
///
266264
/// ```
267-
/// #![feature(rc_weak)]
268-
///
265+
/// # #![feature(rc_weak)]
269266
/// use std::rc::Rc;
270267
///
271268
/// let five = Rc::new(5);
@@ -295,8 +292,7 @@ impl<T: ?Sized> Rc<T> {
295292
/// # Examples
296293
///
297294
/// ```
298-
/// #![feature(rc_unique)]
299-
///
295+
/// # #![feature(rc_unique)]
300296
/// use std::rc::Rc;
301297
///
302298
/// let five = Rc::new(5);
@@ -317,8 +313,7 @@ impl<T: ?Sized> Rc<T> {
317313
/// # Examples
318314
///
319315
/// ```
320-
/// #![feature(rc_unique)]
321-
///
316+
/// # #![feature(rc_unique)]
322317
/// use std::rc::Rc;
323318
///
324319
/// let mut x = Rc::new(3);
@@ -358,8 +353,7 @@ pub fn strong_count<T: ?Sized>(this: &Rc<T>) -> usize { Rc::strong_count(this) }
358353
/// # Examples
359354
///
360355
/// ```
361-
/// #![feature(rc_unique)]
362-
///
356+
/// # #![feature(rc_unique)]
363357
/// use std::rc;
364358
/// use std::rc::Rc;
365359
///
@@ -379,8 +373,7 @@ pub fn is_unique<T>(rc: &Rc<T>) -> bool { Rc::is_unique(rc) }
379373
/// # Examples
380374
///
381375
/// ```
382-
/// #![feature(rc_unique)]
383-
///
376+
/// # #![feature(rc_unique)]
384377
/// use std::rc::{self, Rc};
385378
///
386379
/// let x = Rc::new(3);
@@ -402,8 +395,7 @@ pub fn try_unwrap<T>(rc: Rc<T>) -> Result<T, Rc<T>> { Rc::try_unwrap(rc) }
402395
/// # Examples
403396
///
404397
/// ```
405-
/// #![feature(rc_unique)]
406-
///
398+
/// # #![feature(rc_unique)]
407399
/// use std::rc::{self, Rc};
408400
///
409401
/// let mut x = Rc::new(3);
@@ -427,8 +419,7 @@ impl<T: Clone> Rc<T> {
427419
/// # Examples
428420
///
429421
/// ```
430-
/// #![feature(rc_unique)]
431-
///
422+
/// # #![feature(rc_unique)]
432423
/// use std::rc::Rc;
433424
///
434425
/// let mut five = Rc::new(5);
@@ -759,8 +750,7 @@ impl<T: ?Sized> Weak<T> {
759750
/// # Examples
760751
///
761752
/// ```
762-
/// #![feature(rc_weak)]
763-
///
753+
/// # #![feature(rc_weak)]
764754
/// use std::rc::Rc;
765755
///
766756
/// let five = Rc::new(5);
@@ -788,8 +778,7 @@ impl<T: ?Sized> Drop for Weak<T> {
788778
/// # Examples
789779
///
790780
/// ```
791-
/// #![feature(rc_weak)]
792-
///
781+
/// # #![feature(rc_weak)]
793782
/// use std::rc::Rc;
794783
///
795784
/// {
@@ -836,8 +825,7 @@ impl<T: ?Sized> Clone for Weak<T> {
836825
/// # Examples
837826
///
838827
/// ```
839-
/// #![feature(rc_weak)]
840-
///
828+
/// # #![feature(rc_weak)]
841829
/// use std::rc::Rc;
842830
///
843831
/// let weak_five = Rc::new(5).downgrade();

0 commit comments

Comments
 (0)