Skip to content

Commit 3fcdba3

Browse files
author
Jakub Bukaj
committed
---
yaml --- r: 160246 b: refs/heads/snap-stage3 c: ee66c84 h: refs/heads/master v: v3
1 parent c0fe071 commit 3fcdba3

File tree

5 files changed

+17
-14
lines changed

5 files changed

+17
-14
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: bfaa7bcab3459907014c31d3bf980f65ccd14b08
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 2e9f705b930901a406eeba3cf2b01c015cb86b4d
4+
refs/heads/snap-stage3: ee66c841655c3abb528841704d991c4a5a67ff9d
55
refs/heads/try: 225de0d60f8ca8dcc62ab2fd8818ebbda4b58cfe
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ While we know that we've covered all possible cases, Rust can't tell. It
8484
doesn't know that probability is between 0.0 and 1.0. So we add another case:
8585

8686
```rust
87+
use Event::NewRelease;
88+
8789
enum Event {
8890
NewRelease,
8991
}
@@ -106,7 +108,7 @@ fn descriptive_probability(event: Event) -> &'static str {
106108
}
107109

108110
fn main() {
109-
std::io::println(descriptive_probability(NewRelease));
111+
println!("{}", descriptive_probability(NewRelease));
110112
}
111113
```
112114

@@ -151,15 +153,14 @@ enum Version { Version1, Version2 }
151153
#[deriving(Show)]
152154
enum ParseError { InvalidHeaderLength, InvalidVersion }
153155

154-
155156
fn parse_version(header: &[u8]) -> Result<Version, ParseError> {
156157
if header.len() < 1 {
157-
return Err(InvalidHeaderLength);
158+
return Err(ParseError::InvalidHeaderLength);
158159
}
159160
match header[0] {
160-
1 => Ok(Version1),
161-
2 => Ok(Version2),
162-
_ => Err(InvalidVersion)
161+
1 => Ok(Version::Version1),
162+
2 => Ok(Version::Version2),
163+
_ => Err(ParseError::InvalidVersion)
163164
}
164165
}
165166

branches/snap-stage3/src/libsyntax/visit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ pub fn walk_local<'v, V: Visitor<'v>>(visitor: &mut V, local: &'v Local) {
212212

213213
pub fn walk_lifetime_def<'v, V: Visitor<'v>>(visitor: &mut V,
214214
lifetime_def: &'v LifetimeDef) {
215-
visitor.visit_lifetime_ref(&lifetime_def.lifetime);
215+
visitor.visit_name(lifetime_def.lifetime.span, lifetime_def.lifetime.name);
216216
for bound in lifetime_def.bounds.iter() {
217217
visitor.visit_lifetime_ref(bound);
218218
}

branches/snap-stage3/src/test/compile-fail/bad-lit-suffixes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ fn main() {
3636

3737
1234suffix; //~ ERROR illegal suffix `suffix` for numeric literal
3838
0b101suffix; //~ ERROR illegal suffix `suffix` for numeric literal
39-
1.0suffix; //~ ERROR illegal suffix `suffix` for numeric literal
40-
1.0e10suffix; //~ ERROR illegal suffix `suffix` for numeric literal
39+
1.0suffix; //~ ERROR illegal suffix `suffix` for float literal
40+
1.0e10suffix; //~ ERROR illegal suffix `suffix` for float literal
4141
}

branches/snap-stage3/src/test/compile-fail/issue-19086.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
fn main() {
12-
enum Foo {
13-
FooB { x: i32, y: i32 }
14-
}
11+
use Foo::FooB;
1512

13+
enum Foo {
14+
FooB { x: i32, y: i32 }
15+
}
16+
17+
fn main() {
1618
let f = FooB { x: 3, y: 4 };
1719
match f {
1820
FooB(a, b) => println!("{} {}", a, b),

0 commit comments

Comments
 (0)