Skip to content

Commit 16413c1

Browse files
committed
---
yaml --- r: 208235 b: refs/heads/snap-stage3 c: 2274bf1 h: refs/heads/master i: 208233: 311e167 208231: 3a1b581 v: v3
1 parent 8dfd6a7 commit 16413c1

29 files changed

+78
-281
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 38a97becdf3e6a6157f6f7ec2d98ade8d8edc193
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 788d76281ea624ed675a0b2a509789b1d5bcbdbd
4+
refs/heads/snap-stage3: 2274bf126ae5aa9c3d010b5117118d61bda64972
55
refs/heads/try: 7b4ef47b7805a402d756fb8157101f64880a522f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2028,7 +2028,7 @@ makes it possible to declare these operations. For example, the `str` module
20282028
in the Rust standard library defines the string equality function:
20292029

20302030
```{.ignore}
2031-
#[lang="str_eq"]
2031+
#[lang = "str_eq"]
20322032
pub fn eq_slice(a: &str, b: &str) -> bool {
20332033
// details elided
20342034
}

branches/snap-stage3/src/doc/trpl/error-handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ we can use the `unwrap()` method:
214214
io::stdin().read_line(&mut buffer).unwrap();
215215
```
216216

217-
`unwrap()` will `panic!` if the `Option` is `None`. This basically says "Give
217+
`unwrap()` will `panic!` if the `Result` is `Err`. This basically says "Give
218218
me the value, and if something goes wrong, just crash." This is less reliable
219219
than matching the error and attempting to recover, but is also significantly
220220
shorter. Sometimes, just crashing is appropriate.

branches/snap-stage3/src/doc/trpl/guessing-game.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ prints a [string][strings] to the screen.
131131
let mut guess = String::new();
132132
```
133133

134-
Now we’re getting interesting! There’s a lot going on in this little line. The first thing to notice is that this is a [let statement][let], which is used to create ‘variable bindings’. They take this form:
134+
Now we’re getting interesting! There’s a lot going on in this little line.
135+
The first thing to notice is that this is a [let statement][let], which is
136+
used to create ‘variable bindings’. They take this form:
135137

136138
```rust,ignore
137139
let foo = bar;
@@ -171,7 +173,7 @@ bound to: `String::new()`.
171173

172174
[string]: ../std/string/struct.String.html
173175

174-
The `::new()` syntax is uses `::` because this is an ‘associated function’ of
176+
The `::new()` syntax uses `::` because this is an ‘associated function’ of
175177
a particular type. That is to say, it’s associated with `String` itself,
176178
rather than a particular instance of a `String`. Some languages call this a
177179
‘static method’.

branches/snap-stage3/src/doc/trpl/lang-items.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
The `rustc` compiler has certain pluggable operations, that is,
88
functionality that isn't hard-coded into the language, but is
99
implemented in libraries, with a special marker to tell the compiler
10-
it exists. The marker is the attribute `#[lang="..."]` and there are
10+
it exists. The marker is the attribute `#[lang = "..."]` and there are
1111
various different values of `...`, i.e. various different 'lang
1212
items'.
1313

@@ -28,7 +28,7 @@ extern {
2828
#[lang = "owned_box"]
2929
pub struct Box<T>(*mut T);
3030
31-
#[lang="exchange_malloc"]
31+
#[lang = "exchange_malloc"]
3232
unsafe fn allocate(size: usize, _align: usize) -> *mut u8 {
3333
let p = libc::malloc(size as libc::size_t) as *mut u8;
3434
@@ -39,7 +39,7 @@ unsafe fn allocate(size: usize, _align: usize) -> *mut u8 {
3939
4040
p
4141
}
42-
#[lang="exchange_free"]
42+
#[lang = "exchange_free"]
4343
unsafe fn deallocate(ptr: *mut u8, _size: usize, _align: usize) {
4444
libc::free(ptr as *mut libc::c_void)
4545
}

branches/snap-stage3/src/liballoc/heap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub const EMPTY: *mut () = 0x1 as *mut ();
9595

9696
/// The allocator for unique pointers.
9797
#[cfg(not(test))]
98-
#[lang="exchange_malloc"]
98+
#[lang = "exchange_malloc"]
9999
#[inline]
100100
unsafe fn exchange_malloc(size: usize, align: usize) -> *mut u8 {
101101
if size == 0 {
@@ -108,7 +108,7 @@ unsafe fn exchange_malloc(size: usize, align: usize) -> *mut u8 {
108108
}
109109

110110
#[cfg(not(test))]
111-
#[lang="exchange_free"]
111+
#[lang = "exchange_free"]
112112
#[inline]
113113
unsafe fn exchange_free(ptr: *mut u8, old_size: usize, align: usize) {
114114
deallocate(ptr, old_size, align);

branches/snap-stage3/src/libcore/cell.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ impl<'b, T: ?Sized> DerefMut for RefMut<'b, T> {
634634
///
635635
/// **NOTE:** `UnsafeCell<T>`'s fields are public to allow static initializers. It is not
636636
/// recommended to access its fields directly, `get` should be used instead.
637-
#[lang="unsafe_cell"]
637+
#[lang = "unsafe_cell"]
638638
#[stable(feature = "rust1", since = "1.0.0")]
639639
pub struct UnsafeCell<T: ?Sized> {
640640
/// Wrapped value

branches/snap-stage3/src/libcore/cmp.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use option::Option::{self, Some, None};
4141
/// PartialEq only requires the `eq` method to be implemented; `ne` is defined in terms of it by
4242
/// default. Any manual implementation of `ne` *must* respect the rule that `eq` is a strict
4343
/// inverse of `ne`; that is, `!(a == b)` if and only if `a != b`.
44-
#[lang="eq"]
44+
#[lang = "eq"]
4545
#[stable(feature = "rust1", since = "1.0.0")]
4646
pub trait PartialEq<Rhs: ?Sized = Self> {
4747
/// This method tests for `self` and `other` values to be equal, and is used by `==`.
@@ -222,7 +222,7 @@ impl PartialOrd for Ordering {
222222
/// However it remains possible to implement the others separately for types which do not have a
223223
/// total order. For example, for floating point numbers, `NaN < 0 == false` and `NaN >= 0 ==
224224
/// false` (cf. IEEE 754-2008 section 5.11).
225-
#[lang="ord"]
225+
#[lang = "ord"]
226226
#[stable(feature = "rust1", since = "1.0.0")]
227227
pub trait PartialOrd<Rhs: ?Sized = Self>: PartialEq<Rhs> {
228228
/// This method returns an ordering between `self` and `other` values if one exists.

branches/snap-stage3/src/libcore/iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ fn _assert_is_object_safe(_: &Iterator<Item=()>) {}
8282
/// is returned. A concrete Iterator implementation may choose to behave however
8383
/// it wishes, either by returning `None` infinitely, or by doing something
8484
/// else.
85-
#[lang="iterator"]
85+
#[lang = "iterator"]
8686
#[stable(feature = "rust1", since = "1.0.0")]
8787
#[rustc_on_unimplemented = "`{Self}` is not an iterator; maybe try calling \
8888
`.iter()` or a similar method"]

branches/snap-stage3/src/libcore/marker.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use hash::Hasher;
3333

3434
/// Types able to be transferred across thread boundaries.
3535
#[stable(feature = "rust1", since = "1.0.0")]
36-
#[lang="send"]
36+
#[lang = "send"]
3737
#[rustc_on_unimplemented = "`{Self}` cannot be sent between threads safely"]
3838
pub unsafe trait Send {
3939
// empty.
@@ -46,7 +46,7 @@ impl<T> !Send for *mut T { }
4646

4747
/// Types with a constant size known at compile-time.
4848
#[stable(feature = "rust1", since = "1.0.0")]
49-
#[lang="sized"]
49+
#[lang = "sized"]
5050
#[rustc_on_unimplemented = "`{Self}` does not have a constant size known at compile-time"]
5151
#[fundamental] // for Default, for example, which requires that `[T]: !Default` be evaluatable
5252
pub trait Sized {
@@ -154,7 +154,7 @@ pub trait Sized {
154154
/// then it might be prudent to not implement `Copy`. This is because removing `Copy` is a breaking
155155
/// change: that second example would fail to compile if we made `Foo` non-`Copy`.
156156
#[stable(feature = "rust1", since = "1.0.0")]
157-
#[lang="copy"]
157+
#[lang = "copy"]
158158
pub trait Copy : Clone {
159159
// Empty.
160160
}
@@ -201,7 +201,7 @@ pub trait Copy : Clone {
201201
/// reference; not doing this is undefined behaviour (for example,
202202
/// `transmute`-ing from `&T` to `&mut T` is illegal).
203203
#[stable(feature = "rust1", since = "1.0.0")]
204-
#[lang="sync"]
204+
#[lang = "sync"]
205205
#[rustc_on_unimplemented = "`{Self}` cannot be shared between threads safely"]
206206
pub unsafe trait Sync {
207207
// Empty
@@ -217,7 +217,7 @@ impl<T> !Sync for *mut T { }
217217
/// ensure that they are never copied, even if they lack a destructor.
218218
#[unstable(feature = "core",
219219
reason = "likely to change with new variance strategy")]
220-
#[lang="no_copy_bound"]
220+
#[lang = "no_copy_bound"]
221221
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
222222
pub struct NoCopy;
223223

@@ -359,7 +359,7 @@ macro_rules! impls{
359359
/// better to use a reference type, like `PhantomData<&'a T>`
360360
/// (ideally) or `PhantomData<*const T>` (if no lifetime applies), so
361361
/// as not to indicate ownership.
362-
#[lang="phantom_data"]
362+
#[lang = "phantom_data"]
363363
#[stable(feature = "rust1", since = "1.0.0")]
364364
pub struct PhantomData<T:?Sized>;
365365

branches/snap-stage3/src/libcore/nonzero.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ unsafe impl Zeroable for u64 {}
3131

3232
/// A wrapper type for raw pointers and integers that will never be
3333
/// NULL or 0 that might allow certain optimizations.
34-
#[lang="non_zero"]
34+
#[lang = "non_zero"]
3535
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Hash)]
3636
#[unstable(feature = "core")]
3737
pub struct NonZero<T: Zeroable>(T);

0 commit comments

Comments
 (0)