Skip to content

Commit 3322f26

Browse files
author
Nick Hamann
committed
---
yaml --- r: 212783 b: refs/heads/tmp c: c8b088e h: refs/heads/master i: 212781: 2a4cc97 212779: 5d7c297 212775: 4f9cc23 212767: e521c17 v: v3
1 parent 6d890a7 commit 3322f26

File tree

102 files changed

+326
-560
lines changed

Some content is hidden

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

102 files changed

+326
-560
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3232
refs/heads/beta: 4efc4ec178f6ddf3c8cd268b011f3a04056f9d16
3333
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3434
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
35-
refs/heads/tmp: f6341a878e46084b3afca1f331ed470fb2bd092e
35+
refs/heads/tmp: c8b088eb38128e8b0e50a550d4b89334574f1216
3636
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3737
refs/tags/homu-tmp: bea1c4a78e5233ea6f85a2028a26e08c26635fca
3838
refs/heads/gate: 97c84447b65164731087ea82685580cc81424412

branches/tmp/src/doc/grammar.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,7 @@ type_path_tail : '<' type_expr [ ',' type_expr ] + '>'
281281
## Macros
282282

283283
```antlr
284-
expr_macro_rules : "macro_rules" '!' ident '(' macro_rule * ')' ';'
285-
| "macro_rules" '!' ident '{' macro_rule * '}' ;
284+
expr_macro_rules : "macro_rules" '!' ident '(' macro_rule * ')' ;
286285
macro_rule : '(' matcher * ')' "=>" '(' transcriber * ')' ';' ;
287286
matcher : '(' matcher * ')' | '[' matcher * ']'
288287
| '{' matcher * '}' | '$' ident ':' ident

branches/tmp/src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1550,7 +1550,7 @@ methods in such an implementation can only be used as direct calls on the
15501550
values of the type that the implementation targets. In such an implementation,
15511551
the trait type and `for` after `impl` are omitted. Such implementations are
15521552
limited to nominal types (enums, structs), and the implementation must appear
1553-
in the same module or a sub-module as the `self` type:
1553+
in the same crate as the `self` type:
15541554

15551555
```
15561556
struct Point {x: i32, y: i32}

branches/tmp/src/doc/trpl/enums.md

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -64,45 +64,3 @@ equality yet, but we’ll find out in the [`traits`][traits] section.
6464
[match]: match.html
6565
[if-let]: if-let.html
6666
[traits]: traits.html
67-
68-
# Constructors as functions
69-
70-
An enum’s constructors can also be used like functions. For example:
71-
72-
```rust
73-
# enum Message {
74-
# Write(String),
75-
# }
76-
let m = Message::Write("Hello, world".to_string());
77-
```
78-
79-
Is the same as
80-
81-
```rust
82-
# enum Message {
83-
# Write(String),
84-
# }
85-
fn foo(x: String) -> Message {
86-
Message::Write(x)
87-
}
88-
89-
let x = foo("Hello, world".to_string());
90-
```
91-
92-
This is not immediately useful to us, but when we get to
93-
[`closures`][closures], we’ll talk about passing functions as arguments to
94-
other functions. For example, with [`iterators`][iterators], we can do this
95-
to convert a vector of `String`s into a vector of `Message::Write`s:
96-
97-
```rust
98-
# enum Message {
99-
# Write(String),
100-
# }
101-
102-
let v = vec!["Hello".to_string(), "World".to_string()];
103-
104-
let v1: Vec<Message> = v.into_iter().map(Message::Write).collect();
105-
```
106-
107-
[closures]: closures.html
108-
[iterators]: iterators.html

branches/tmp/src/doc/trpl/ffi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ However it is often desired that the callback is targeted to a special
238238
Rust object. This could be the object that represents the wrapper for the
239239
respective C object.
240240
241-
This can be achieved by passing an raw pointer to the object down to the
241+
This can be achieved by passing an unsafe pointer to the object down to the
242242
C library. The C library can then include the pointer to the Rust object in
243243
the notification. This will allow the callback to unsafely access the
244244
referenced Rust object.
@@ -370,7 +370,7 @@ On OSX, frameworks behave with the same semantics as a dynamic library.
370370
371371
# Unsafe blocks
372372
373-
Some operations, like dereferencing raw pointers or calling functions that have been marked
373+
Some operations, like dereferencing unsafe pointers or calling functions that have been marked
374374
unsafe are only allowed inside unsafe blocks. Unsafe blocks isolate unsafety and are a promise to
375375
the compiler that the unsafety does not leak out of the block.
376376

branches/tmp/src/doc/trpl/functions.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,7 @@ an expression, and a `let` can only begin a statement, not an expression.
144144
Note that assigning to an already-bound variable (e.g. `y = 5`) is still an
145145
expression, although its value is not particularly useful. Unlike other
146146
languages where an assignment evaluates to the assigned value (e.g. `5` in the
147-
previous example), in Rust the value of an assignment is an empty tuple `()`
148-
because the assigned value can have [just one owner](ownership.html), and any
149-
other returned value would be too surprising:
147+
previous example), in Rust the value of an assignment is an empty tuple `()`:
150148

151149
```rust
152150
let mut y = 5;

branches/tmp/src/doc/trpl/raw-pointers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ println!("raw points at {}", *raw);
5252
It gives this error:
5353

5454
```text
55-
error: dereference of raw pointer requires unsafe function or block [E0133]
56-
println!("raw points at {}", *raw);
57-
^~~~
55+
error: dereference of unsafe pointer requires unsafe function or block [E0133]
56+
println!("raw points at{}", *raw);
57+
^~~~
5858
```
5959

6060
When you dereference a raw pointer, you’re taking responsibility that it’s not

branches/tmp/src/doc/trpl/strings.md

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -117,30 +117,6 @@ let dog = hachiko.chars().nth(1); // kinda like hachiko[1]
117117

118118
This emphasizes that we have to go through the whole list of `chars`.
119119

120-
## Slicing
121-
122-
You can get a slice of a string with slicing syntax:
123-
124-
```rust
125-
let dog = "hachiko";
126-
let hachi = &dog[0..5];
127-
```
128-
129-
But note that these are _byte_ offsets, not _character_ offsets. So
130-
this will fail at runtime:
131-
132-
```rust,should_panic
133-
let dog = "忠犬ハチ公";
134-
let hachi = &dog[0..2];
135-
```
136-
137-
with this error:
138-
139-
```text
140-
thread '<main>' panicked at 'index 0 and/or 2 in `忠犬ハチ公` do not lie on
141-
character boundary'
142-
```
143-
144120
## Concatenation
145121

146122
If you have a `String`, you can concatenate a `&str` to the end of it:

branches/tmp/src/liballoc/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
//!
2323
//! ## Boxed values
2424
//!
25-
//! The [`Box`](boxed/index.html) type is a smart pointer type. There can
26-
//! only be one owner of a `Box`, and the owner can decide to mutate the
27-
//! contents, which live on the heap.
25+
//! The [`Box`](boxed/index.html) type is the core owned pointer type in Rust.
26+
//! There can only be one owner of a `Box`, and the owner can decide to mutate
27+
//! the contents, which live on the heap.
2828
//!
2929
//! This type can be sent among threads efficiently as the size of a `Box` value
3030
//! is the same as that of a pointer. Tree-like data structures are often built

branches/tmp/src/libcollections/borrow.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ use core::ops::Deref;
2121
use core::option::Option;
2222

2323
use fmt;
24-
use alloc::{boxed, rc, arc};
24+
use alloc::{rc, arc};
2525

2626
use self::Cow::*;
2727

@@ -116,14 +116,6 @@ impl<'a, T: ?Sized> BorrowMut<T> for &'a mut T {
116116
fn borrow_mut(&mut self) -> &mut T { &mut **self }
117117
}
118118

119-
impl<T: ?Sized> Borrow<T> for boxed::Box<T> {
120-
fn borrow(&self) -> &T { &**self }
121-
}
122-
123-
impl<T: ?Sized> BorrowMut<T> for boxed::Box<T> {
124-
fn borrow_mut(&mut self) -> &mut T { &mut **self }
125-
}
126-
127119
impl<T: ?Sized> Borrow<T> for rc::Rc<T> {
128120
fn borrow(&self) -> &T { &**self }
129121
}

branches/tmp/src/libcollections/slice.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ impl<T> [T] {
370370
core_slice::SliceExt::get_unchecked_mut(self, index)
371371
}
372372

373-
/// Returns an raw pointer to the slice's buffer
373+
/// Returns an unsafe pointer to the slice's buffer
374374
///
375375
/// The caller must ensure that the slice outlives the pointer this
376376
/// function returns, or else it will end up pointing to garbage.

0 commit comments

Comments
 (0)