Skip to content

Commit 58f2957

Browse files
committed
---
yaml --- r: 35910 b: refs/heads/try2 c: d81d4f1 h: refs/heads/master v: v3
1 parent d219bf0 commit 58f2957

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 0b1a401bb73299640eaec28937228538d916887a
8+
refs/heads/try2: d81d4f1f3c94716c6dcafaf88d860aaa5d3598ca
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try2/doc/rust.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -859,8 +859,8 @@ fn main() {
859859
log(info, Some(1.0));
860860
861861
// Equivalent to 'log(core::info,
862-
// core::str::to_upper(core::str::slice(~"foo", 0u, 1u)));'
863-
log(info, to_upper(slice(~"foo", 0u, 1u)));
862+
// core::str::to_upper(core::str::slice("foo", 0u, 1u)));'
863+
log(info, to_upper(slice("foo", 0u, 1u)));
864864
}
865865
~~~~
866866

@@ -1050,14 +1050,14 @@ were declared without the `!` annotation, the following code would not
10501050
typecheck:
10511051

10521052
~~~~
1053-
# fn my_err(s: ~str) -> ! { fail }
1053+
# fn my_err(s: &str) -> ! { fail }
10541054
10551055
fn f(i: int) -> int {
10561056
if i == 42 {
10571057
return 42;
10581058
}
10591059
else {
1060-
my_err(~"Bad number!");
1060+
my_err("Bad number!");
10611061
}
10621062
}
10631063
~~~~
@@ -1502,7 +1502,7 @@ string, boolean value, or the nil value.
15021502

15031503
~~~~~~~~ {.literals}
15041504
(); // nil type
1505-
~"hello"; // string type
1505+
"hello"; // string type
15061506
'5'; // character type
15071507
5; // integer type
15081508
~~~~~~~~
@@ -1520,7 +1520,7 @@ values.
15201520

15211521
~~~~~~~~ {.tuple}
15221522
(0f, 4.5f);
1523-
(~"a", 4u, true);
1523+
("a", 4u, true);
15241524
~~~~~~~~
15251525

15261526
### Record expressions
@@ -1539,8 +1539,8 @@ written before its name.
15391539

15401540
~~~~
15411541
{x: 10f, y: 20f};
1542-
{name: ~"Joe", age: 35u, score: 100_000};
1543-
{ident: ~"X", mut count: 0u};
1542+
{name: "Joe", age: 35u, score: 100_000};
1543+
{ident: "X", mut count: 0u};
15441544
~~~~
15451545

15461546
The order of the fields in a record expression is significant, and
@@ -1609,7 +1609,7 @@ When no mutability is specified, the vector is immutable.
16091609

16101610
~~~~
16111611
~[1, 2, 3, 4];
1612-
~[~"a", ~"b", ~"c", ~"d"];
1612+
~["a", "b", "c", "d"];
16131613
~[mut 0u8, 0u8, 0u8, 0u8];
16141614
~~~~
16151615

@@ -1633,7 +1633,7 @@ task in a _failing state_.
16331633
16341634
(~[1, 2, 3, 4])[0];
16351635
(~[mut 'x', 'y'])[1] = 'z';
1636-
(~[~"a", ~"b"])[10]; // fails
1636+
(~["a", "b"])[10]; // fails
16371637
16381638
# }
16391639
~~~~
@@ -2034,7 +2034,7 @@ An example:
20342034
let mut i = 0;
20352035
20362036
while i < 10 {
2037-
io::println(~"hello\n");
2037+
io::println("hello\n");
20382038
i = i + 1;
20392039
}
20402040
~~~~
@@ -2281,9 +2281,9 @@ range of values may be specified with `..`. For example:
22812281
# let x = 2;
22822282
22832283
let message = match x {
2284-
0 | 1 => ~"not many",
2285-
2 .. 9 => ~"a few",
2286-
_ => ~"lots"
2284+
0 | 1 => "not many",
2285+
2 .. 9 => "a few",
2286+
_ => "lots"
22872287
};
22882288
~~~~
22892289

@@ -2366,7 +2366,7 @@ The following examples all produce the same output, logged at the `error`
23662366
logging level:
23672367

23682368
~~~~
2369-
# let filename = ~"bulbasaur";
2369+
# let filename = "bulbasaur";
23702370
23712371
// Full version, logging a value.
23722372
log(core::error, ~"file not found: " + filename);

0 commit comments

Comments
 (0)