Skip to content

Commit b6c414b

Browse files
committed
---
yaml --- r: 222655 b: refs/heads/tmp c: 823f4fc h: refs/heads/master i: 222653: ba84cad 222651: cfface0 222647: c9e1270 222639: 8257ebd 222623: 9f99550 222591: 7b93074 v: v3
1 parent ac1ba61 commit b6c414b

File tree

199 files changed

+1783
-7772
lines changed

Some content is hidden

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

199 files changed

+1783
-7772
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2626
refs/heads/beta: 2b45108ecb944d63daba0f1b5529ac4c8afdc295
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: 798ce502845435d94856a7b5fed5f703b06506d1
28+
refs/heads/tmp: 823f4fcf22d4dc02e00447c21e7d15c2af904a1d
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: e58601ab085591c71a27ae82137fc313222c2270
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

branches/tmp/.gitattributes

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,4 @@
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
119
*.woff binary

branches/tmp/configure

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

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

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

Lines changed: 6 additions & 4 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 &lquo;read-write lock&rquo;
45+
These are immutable and mutable references respectively. They follow the “read-write lock”
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-
&lquo;Cell&rquo;s provide interior mutability. In other words, they contain data which can be manipulated even
111+
`Cell`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,7 +127,8 @@ 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;
130+
use std::cell::Cell;
131+
131132
let x = Cell::new(1);
132133
let y = &x;
133134
let z = &x;
@@ -185,7 +186,8 @@ any other borrows active when a mutable borrow is active. If the programmer atte
185186
borrow, the thread will panic.
186187

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

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

Lines changed: 2 additions & 3 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, _))] => token::get_ident(s).to_string(),
64+
[TtToken(_, token::Ident(s, _))] => s.to_string(),
6565
_ => {
6666
cx.span_err(sp, "argument should be a single identifier");
6767
return DummyResult::any(sp);
@@ -186,8 +186,7 @@ impl LintPass for Pass {
186186
}
187187
188188
fn check_item(&mut self, cx: &Context, it: &ast::Item) {
189-
let name = token::get_ident(it.ident);
190-
if name.get() == "lintme" {
189+
if it.ident.name == "lintme" {
191190
cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'");
192191
}
193192
}

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,10 @@ 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+
358362
Now that our functions are public, we can use them. Great! However, typing out
359363
`phrases::english::greetings::hello()` is very long and repetitive. Rust has
360364
another keyword for importing names into the current scope, so that you can
@@ -517,9 +521,6 @@ of `foo` relative to where we are. If that’s prefixed with `::`, as in
517521
`::foo::bar()`, it refers to a different `foo`, an absolute path from your
518522
crate root.
519523
520-
Also, note that we `pub use`d before we declared our `mod`s. Rust requires that
521-
`use` declarations go first.
522-
523524
This will build and run:
524525
525526
```bash

branches/tmp/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 between one and a hundred.
502+
so we need `1` and `101` to get a number ranging from one to a hundred.
503503

504504
[concurrency]: concurrency.html
505505

branches/tmp/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/tmp/src/liballoc/arc.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,8 @@ impl<T: ?Sized> Arc<T> {
200200
/// # Examples
201201
///
202202
/// ```
203-
/// # #![feature(arc_weak)]
203+
/// #![feature(arc_weak)]
204+
///
204205
/// use std::sync::Arc;
205206
///
206207
/// let five = Arc::new(5);
@@ -337,7 +338,8 @@ impl<T: Clone> Arc<T> {
337338
/// # Examples
338339
///
339340
/// ```
340-
/// # #![feature(arc_unique)]
341+
/// #![feature(arc_unique)]
342+
///
341343
/// use std::sync::Arc;
342344
///
343345
/// let mut five = Arc::new(5);
@@ -408,7 +410,8 @@ impl<T: ?Sized> Arc<T> {
408410
/// # Examples
409411
///
410412
/// ```
411-
/// # #![feature(arc_unique, alloc)]
413+
/// #![feature(arc_unique, alloc)]
414+
///
412415
/// extern crate alloc;
413416
/// # fn main() {
414417
/// use alloc::arc::Arc;
@@ -555,7 +558,8 @@ impl<T: ?Sized> Weak<T> {
555558
/// # Examples
556559
///
557560
/// ```
558-
/// # #![feature(arc_weak)]
561+
/// #![feature(arc_weak)]
562+
///
559563
/// use std::sync::Arc;
560564
///
561565
/// let five = Arc::new(5);
@@ -599,7 +603,8 @@ impl<T: ?Sized> Clone for Weak<T> {
599603
/// # Examples
600604
///
601605
/// ```
602-
/// # #![feature(arc_weak)]
606+
/// #![feature(arc_weak)]
607+
///
603608
/// use std::sync::Arc;
604609
///
605610
/// let weak_five = Arc::new(5).downgrade();
@@ -626,7 +631,8 @@ impl<T: ?Sized> Drop for Weak<T> {
626631
/// # Examples
627632
///
628633
/// ```
629-
/// # #![feature(arc_weak)]
634+
/// #![feature(arc_weak)]
635+
///
630636
/// use std::sync::Arc;
631637
///
632638
/// {

branches/tmp/src/liballoc/boxed.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ use core::raw::{TraitObject};
7575
/// The following two examples are equivalent:
7676
///
7777
/// ```
78-
/// # #![feature(box_heap)]
78+
/// #![feature(box_heap)]
79+
///
7980
/// #![feature(box_syntax, placement_in_syntax)]
8081
/// use std::boxed::HEAP;
8182
///
@@ -241,7 +242,8 @@ impl<T : ?Sized> Box<T> {
241242
///
242243
/// # Examples
243244
/// ```
244-
/// # #![feature(box_raw)]
245+
/// #![feature(box_raw)]
246+
///
245247
/// let seventeen = Box::new(17u32);
246248
/// let raw = Box::into_raw(seventeen);
247249
/// let boxed_again = unsafe { Box::from_raw(raw) };
@@ -264,7 +266,8 @@ impl<T : ?Sized> Box<T> {
264266
///
265267
/// # Examples
266268
/// ```
267-
/// # #![feature(box_raw)]
269+
/// #![feature(box_raw)]
270+
///
268271
/// use std::boxed;
269272
///
270273
/// let seventeen = Box::new(17u32);
@@ -307,7 +310,8 @@ impl<T: Clone> Clone for Box<T> {
307310
/// # Examples
308311
///
309312
/// ```
310-
/// # #![feature(box_raw)]
313+
/// #![feature(box_raw)]
314+
///
311315
/// let x = Box::new(5);
312316
/// let mut y = Box::new(10);
313317
///

branches/tmp/src/liballoc/rc.rs

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@
9191
//! documentation for more details on interior mutability.
9292
//!
9393
//! ```rust
94-
//! # #![feature(rc_weak)]
94+
//! #![feature(rc_weak)]
95+
//!
9596
//! use std::rc::Rc;
9697
//! use std::rc::Weak;
9798
//! use std::cell::RefCell;
@@ -227,7 +228,8 @@ impl<T> Rc<T> {
227228
/// # Examples
228229
///
229230
/// ```
230-
/// # #![feature(rc_unique)]
231+
/// #![feature(rc_unique)]
232+
///
231233
/// use std::rc::Rc;
232234
///
233235
/// let x = Rc::new(3);
@@ -262,7 +264,8 @@ impl<T: ?Sized> Rc<T> {
262264
/// # Examples
263265
///
264266
/// ```
265-
/// # #![feature(rc_weak)]
267+
/// #![feature(rc_weak)]
268+
///
266269
/// use std::rc::Rc;
267270
///
268271
/// let five = Rc::new(5);
@@ -292,7 +295,8 @@ impl<T: ?Sized> Rc<T> {
292295
/// # Examples
293296
///
294297
/// ```
295-
/// # #![feature(rc_unique)]
298+
/// #![feature(rc_unique)]
299+
///
296300
/// use std::rc::Rc;
297301
///
298302
/// let five = Rc::new(5);
@@ -313,7 +317,8 @@ impl<T: ?Sized> Rc<T> {
313317
/// # Examples
314318
///
315319
/// ```
316-
/// # #![feature(rc_unique)]
320+
/// #![feature(rc_unique)]
321+
///
317322
/// use std::rc::Rc;
318323
///
319324
/// let mut x = Rc::new(3);
@@ -353,7 +358,8 @@ pub fn strong_count<T: ?Sized>(this: &Rc<T>) -> usize { Rc::strong_count(this) }
353358
/// # Examples
354359
///
355360
/// ```
356-
/// # #![feature(rc_unique)]
361+
/// #![feature(rc_unique)]
362+
///
357363
/// use std::rc;
358364
/// use std::rc::Rc;
359365
///
@@ -373,7 +379,8 @@ pub fn is_unique<T>(rc: &Rc<T>) -> bool { Rc::is_unique(rc) }
373379
/// # Examples
374380
///
375381
/// ```
376-
/// # #![feature(rc_unique)]
382+
/// #![feature(rc_unique)]
383+
///
377384
/// use std::rc::{self, Rc};
378385
///
379386
/// let x = Rc::new(3);
@@ -395,7 +402,8 @@ pub fn try_unwrap<T>(rc: Rc<T>) -> Result<T, Rc<T>> { Rc::try_unwrap(rc) }
395402
/// # Examples
396403
///
397404
/// ```
398-
/// # #![feature(rc_unique)]
405+
/// #![feature(rc_unique)]
406+
///
399407
/// use std::rc::{self, Rc};
400408
///
401409
/// let mut x = Rc::new(3);
@@ -419,7 +427,8 @@ impl<T: Clone> Rc<T> {
419427
/// # Examples
420428
///
421429
/// ```
422-
/// # #![feature(rc_unique)]
430+
/// #![feature(rc_unique)]
431+
///
423432
/// use std::rc::Rc;
424433
///
425434
/// let mut five = Rc::new(5);
@@ -750,7 +759,8 @@ impl<T: ?Sized> Weak<T> {
750759
/// # Examples
751760
///
752761
/// ```
753-
/// # #![feature(rc_weak)]
762+
/// #![feature(rc_weak)]
763+
///
754764
/// use std::rc::Rc;
755765
///
756766
/// let five = Rc::new(5);
@@ -778,7 +788,8 @@ impl<T: ?Sized> Drop for Weak<T> {
778788
/// # Examples
779789
///
780790
/// ```
781-
/// # #![feature(rc_weak)]
791+
/// #![feature(rc_weak)]
792+
///
782793
/// use std::rc::Rc;
783794
///
784795
/// {
@@ -825,7 +836,8 @@ impl<T: ?Sized> Clone for Weak<T> {
825836
/// # Examples
826837
///
827838
/// ```
828-
/// # #![feature(rc_weak)]
839+
/// #![feature(rc_weak)]
840+
///
829841
/// use std::rc::Rc;
830842
///
831843
/// let weak_five = Rc::new(5).downgrade();

0 commit comments

Comments
 (0)