Skip to content

Commit 5b2c1b4

Browse files
committed
---
yaml --- r: 209918 b: refs/heads/try c: 9316b03 h: refs/heads/master v: v3
1 parent bcdab54 commit 5b2c1b4

File tree

7 files changed

+31
-22
lines changed

7 files changed

+31
-22
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3e561f05c00cd180ec02db4ccab2840a4aba93d2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
5-
refs/heads/try: 2c2abe9a75b0a9d30b020df5a9e46e96cac89d57
5+
refs/heads/try: 9316b0382bc8f4451df8512f4c80f064f13830f9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/doc/reference.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,14 @@ explicit code point lists. [^inputformat]
6868
## Special Unicode Productions
6969

7070
The following productions in the Rust grammar are defined in terms of Unicode
71-
properties: `ident`, `non_null`, `non_star`, `non_eol`, `non_slash_or_star`,
72-
`non_single_quote` and `non_double_quote`.
71+
properties: `ident`, `non_null`, `non_eol`, `non_single_quote` and `non_double_quote`.
7372

7473
### Identifiers
7574

76-
The `ident` production is any nonempty Unicode string of the following form:
75+
The `ident` production is any nonempty Unicode[^non_ascii_idents] string of the following form:
76+
77+
[^non_ascii_idents]: Non-ASCII characters in identifiers are currently feature
78+
gated. This is expected to improve soon.
7779

7880
- The first character has property `XID_start`
7981
- The remaining characters have property `XID_continue`
@@ -90,8 +92,6 @@ Some productions are defined by exclusion of particular Unicode characters:
9092

9193
- `non_null` is any single Unicode character aside from `U+0000` (null)
9294
- `non_eol` is `non_null` restricted to exclude `U+000A` (`'\n'`)
93-
- `non_star` is `non_null` restricted to exclude `U+002A` (`*`)
94-
- `non_slash_or_star` is `non_null` restricted to exclude `U+002F` (`/`) and `U+002A` (`*`)
9595
- `non_single_quote` is `non_null` restricted to exclude `U+0027` (`'`)
9696
- `non_double_quote` is `non_null` restricted to exclude `U+0022` (`"`)
9797

@@ -269,10 +269,11 @@ r##"foo #"# bar"##; // foo #"# bar
269269
##### Byte literals
270270

271271
A _byte literal_ is a single ASCII character (in the `U+0000` to `U+007F`
272-
range) enclosed within two `U+0027` (single-quote) characters, with the
273-
exception of `U+0027` itself, which must be _escaped_ by a preceding U+005C
274-
character (`\`), or a single _escape_. It is equivalent to a `u8` unsigned
275-
8-bit integer _number literal_.
272+
range) or a single _escape_ preceded by the characters `U+0062` (`b`) and
273+
`U+0027` (single-quote), and followed by the character `U+0027`. If the character
274+
`U+0027` is present within the literal, it must be _escaped_ by a preceding
275+
`U+005C` (`\`) character. It is equivalent to a `u8` unsigned 8-bit integer
276+
_number literal_.
276277

277278
##### Byte string literals
278279

@@ -1976,7 +1977,7 @@ For any lint check `C`:
19761977

19771978
The lint checks supported by the compiler can be found via `rustc -W help`,
19781979
along with their default settings. [Compiler
1979-
plugins](book/plugins.html#lint-plugins) can provide additional lint checks.
1980+
plugins](book/compiler-plugins.html#lint-plugins) can provide additional lint checks.
19801981

19811982
```{.ignore}
19821983
mod m1 {
@@ -3646,4 +3647,4 @@ that have since been removed):
36463647
pattern syntax
36473648

36483649
[ffi]: book/ffi.html
3649-
[plugin]: book/plugins.html
3650+
[plugin]: book/compiler-plugins.html
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
% Getting Started
22

33
This first section of the book will get you going with Rust and its tooling.
4-
First, we’ll install Rust. Then: the classic ‘Hello World’ program. Finally,
4+
First, we’ll install Rust. Then, the classic ‘Hello World’ program. Finally,
55
we’ll talk about Cargo, Rust’s build system and package manager.

branches/try/src/doc/trpl/glossary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In the example above `x` and `y` have arity 2. `z` has arity 3.
1919

2020
When a compiler is compiling your program, it does a number of different
2121
things. One of the things that it does is turn the text of your program into an
22-
'abstract syntax tree,' or 'AST.' This tree is a representation of the
22+
abstract syntax tree’, orAST’. This tree is a representation of the
2323
structure of your program. For example, `2 + 3` can be turned into a tree:
2424

2525
```text

branches/try/src/doc/trpl/primitive-types.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ let y = 1.0; // y has type f64
6262
Here’s a list of the different numeric types, with links to their documentation
6363
in the standard library:
6464

65+
* [i8](../std/primitive.i8.html)
6566
* [i16](../std/primitive.i16.html)
6667
* [i32](../std/primitive.i32.html)
6768
* [i64](../std/primitive.i64.html)
68-
* [i8](../std/primitive.i8.html)
69+
* [u8](../std/primitive.u8.html)
6970
* [u16](../std/primitive.u16.html)
7071
* [u32](../std/primitive.u32.html)
7172
* [u64](../std/primitive.u64.html)
72-
* [u8](../std/primitive.u8.html)
7373
* [isize](../std/primitive.isize.html)
7474
* [usize](../std/primitive.usize.html)
7575
* [f32](../std/primitive.f32.html)
@@ -82,12 +82,12 @@ Let’s go over them by category:
8282
Integer types come in two varieties: signed and unsigned. To understand the
8383
difference, let’s consider a number with four bits of size. A signed, four-bit
8484
number would let you store numbers from `-8` to `+7`. Signed numbers use
85-
two’s compliment representation. An unsigned four bit number, since it does
85+
two’s compliment representation. An unsigned four bit number, since it does
8686
not need to store negatives, can store values from `0` to `+15`.
8787

8888
Unsigned types use a `u` for their category, and signed types use `i`. The `i`
8989
is for ‘integer’. So `u8` is an eight-bit unsigned number, and `i8` is an
90-
eight-bit signed number.
90+
eight-bit signed number.
9191

9292
## Fixed size types
9393

@@ -103,7 +103,7 @@ and unsigned varieties. This makes for two types: `isize` and `usize`.
103103

104104
## Floating-point types
105105

106-
Rust also two floating point types: `f32` and `f64`. These correspond to
106+
Rust also has two floating point types: `f32` and `f64`. These correspond to
107107
IEEE-754 single and double precision numbers.
108108

109109
# Arrays
@@ -241,8 +241,8 @@ println!("x is {}", x);
241241
Remember [before][let] when I said the left-hand side of a `let` statement was more
242242
powerful than just assigning a binding? Here we are. We can put a pattern on
243243
the left-hand side of the `let`, and if it matches up to the right-hand side,
244-
we can assign multiple bindings at once. In this case, `let` "destructures,"
245-
or "breaks up," the tuple, and assigns the bits to three bindings.
244+
we can assign multiple bindings at once. In this case, `let` destructures
245+
or breaks up the tuple, and assigns the bits to three bindings.
246246

247247
[let]: variable-bindings.html
248248

branches/try/src/doc/trpl/variable-bindings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% Variable Bindings
22

3-
Virtually every non-Hello World’ Rust program uses *variable bindings*. They
3+
Virtually every non-'Hello World’ Rust program uses *variable bindings*. They
44
look like this:
55

66
```rust

branches/try/src/libstd/path.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,6 +1241,14 @@ impl Path {
12411241
///
12421242
/// Path::new("foo.txt");
12431243
/// ```
1244+
///
1245+
/// You can create `Path`s from `String`s, or even other `Path`s:
1246+
///
1247+
/// ```
1248+
/// let s = String::from("bar.txt");
1249+
/// let p = Path::new(&s);
1250+
/// Path::new(&p);
1251+
/// ```
12441252
#[stable(feature = "rust1", since = "1.0.0")]
12451253
pub fn new<S: AsRef<OsStr> + ?Sized>(s: &S) -> &Path {
12461254
unsafe { mem::transmute(s.as_ref()) }

0 commit comments

Comments
 (0)