Skip to content

Commit 4b70128

Browse files
author
Nick Hamann
committed
---
yaml --- r: 216823 b: refs/heads/stable c: 788d762 h: refs/heads/master i: 216821: 15383ae 216819: e780579 216815: 6600962 v: v3
1 parent 37da407 commit 4b70128

30 files changed

+281
-79
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ refs/heads/tmp: 378a370ff2057afeb1eae86eb6e78c476866a4a6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: a5286998df566e736b32f6795bfc3803bdaf453d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 87a62787232df4def8f1d100c80557d561a369f1
32+
refs/heads/stable: 788d76281ea624ed675a0b2a509789b1d5bcbdbd
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375

branches/stable/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/stable/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 `Result` is `Err`. This basically says "Give
217+
`unwrap()` will `panic!` if the `Option` is `None`. 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/stable/src/doc/trpl/guessing-game.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@ 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.
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:
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:
137135

138136
```rust,ignore
139137
let foo = bar;
@@ -173,7 +171,7 @@ bound to: `String::new()`.
173171

174172
[string]: ../std/string/struct.String.html
175173

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

branches/stable/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/stable/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/stable/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/stable/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/stable/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/stable/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/stable/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)