Skip to content

Commit e86e4b5

Browse files
committed
---
yaml --- r: 139341 b: refs/heads/try2 c: b07b36b h: refs/heads/master i: 139339: d831a49 v: v3
1 parent b0500a7 commit e86e4b5

File tree

11 files changed

+27
-25
lines changed

11 files changed

+27
-25
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: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: f41a510631ca8e41f16c8a0097a179d067ce4f7d
8+
refs/heads/try2: b07b36bbf30c9b7c9120e34b518d47244e981019
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/doc/rust.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -830,12 +830,12 @@ An example of re-exporting:
830830
~~~~
831831
# fn main() { }
832832
mod quux {
833+
pub use quux::foo::*;
834+
833835
pub mod foo {
834836
pub fn bar() { }
835837
pub fn baz() { }
836838
}
837-
838-
pub use quux::foo::*;
839839
}
840840
~~~~
841841

@@ -2008,8 +2008,8 @@ then the expression completes.
20082008
Some examples of call expressions:
20092009

20102010
~~~~
2011-
# fn add(x: int, y: int) -> int { 0 }
20122011
# use core::from_str::FromStr::from_str;
2012+
# fn add(x: int, y: int) -> int { 0 }
20132013
20142014
let x: int = add(1, 2);
20152015
let pi = from_str::<f32>("3.14");

branches/try2/doc/tutorial.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,9 +2054,9 @@ name and a double colon. The compiler uses type inference to decide which
20542054
implementation to use.
20552055

20562056
~~~~
2057-
trait Shape { fn new(area: float) -> Self; }
20582057
# use core::float::consts::pi;
20592058
# use core::float::sqrt;
2059+
trait Shape { fn new(area: float) -> Self; }
20602060
struct Circle { radius: float }
20612061
struct Square { length: float }
20622062
@@ -2211,11 +2211,11 @@ trait Circle : Shape { fn radius(&self) -> float; }
22112211
Now, we can implement `Circle` on a type only if we also implement `Shape`.
22122212

22132213
~~~~
2214+
# use core::float::consts::pi;
2215+
# use core::float::sqrt;
22142216
# trait Shape { fn area(&self) -> float; }
22152217
# trait Circle : Shape { fn radius(&self) -> float; }
22162218
# struct Point { x: float, y: float }
2217-
# use core::float::consts::pi;
2218-
# use core::float::sqrt;
22192219
# fn square(x: float) -> float { x * x }
22202220
struct CircleStruct { center: Point, radius: float }
22212221
impl Circle for CircleStruct {
@@ -2247,10 +2247,10 @@ fn radius_times_area<T: Circle>(c: T) -> float {
22472247
Likewise, supertrait methods may also be called on trait objects.
22482248

22492249
~~~ {.xfail-test}
2250-
# trait Shape { fn area(&self) -> float; }
2251-
# trait Circle : Shape { fn radius(&self) -> float; }
22522250
# use core::float::consts::pi;
22532251
# use core::float::sqrt;
2252+
# trait Shape { fn area(&self) -> float; }
2253+
# trait Circle : Shape { fn radius(&self) -> float; }
22542254
# struct Point { x: float, y: float }
22552255
# struct CircleStruct { center: Point, radius: float }
22562256
# impl Circle for CircleStruct { fn radius(&self) -> float { sqrt(self.area() / pi) } }

branches/try2/src/test/auxiliary/pub_use_mods_xcrate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
// except according to those terms.
1010

1111
pub mod a {
12+
pub use a::b::c;
13+
1214
pub mod b {
1315
pub mod c {
1416
fn f(){}
1517
fn g(){}
1618
}
1719
}
18-
19-
pub use a::b::c;
2020
}
2121

branches/try2/src/test/bench/shootout-binarytrees.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extern mod std;
1212
use std::arena;
1313
use methods = std::arena::Arena;
1414

15-
enum tree {
15+
enum tree<'self> {
1616
nil,
1717
node(&'self tree<'self>, &'self tree<'self>, int),
1818
}
@@ -26,9 +26,10 @@ fn item_check(t: &tree) -> int {
2626
}
2727
}
2828

29-
fn bottom_up_tree(arena: &'r arena::Arena,
30-
item: int,
31-
depth: int) -> &'r tree<'r> {
29+
fn bottom_up_tree<'r>(arena: &'r arena::Arena,
30+
item: int,
31+
depth: int)
32+
-> &'r tree<'r> {
3233
if depth > 0 {
3334
return arena.alloc(
3435
|| node(bottom_up_tree(arena, 2 * item - 1, depth - 1),

branches/try2/src/test/compile-fail/issue-4366.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
// ensures that 'use foo:*' doesn't import non-public 'use' statements in the
1414
// module 'foo'
1515

16+
use m1::*;
17+
1618
mod foo {
1719
pub fn foo() {}
1820
}
@@ -31,7 +33,6 @@ mod a {
3133
mod m1 {
3234
fn foo() {}
3335
}
34-
use m1::*;
3536

3637
fn main() {
3738
foo(); //~ ERROR: unresolved name: `foo`

branches/try2/src/test/compile-fail/regions-in-enums.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010

1111
enum yes0<'lt> {
1212
// This will eventually be legal (and in fact the only way):
13-
X3(&'lt uint) //~ ERROR Illegal lifetime 'lt: this lifetime must be declared
13+
X3(&'lt uint) //~ ERROR Illegal lifetime 'lt: only 'self is allowed
1414
}
1515

1616
enum yes1<'self> {
1717
X4(&'self uint)
1818
}
1919

2020
enum yes2 {
21-
X5(&'foo uint) //~ ERROR Illegal lifetime 'foo: this lifetime must be declared
21+
X5(&'foo uint) //~ ERROR Illegal lifetime 'foo: only 'self is allowed
2222
}
2323

2424
fn main() {}

branches/try2/src/test/compile-fail/regions-in-type-items.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct item_ty_yes1<'self> {
1717
}
1818

1919
struct item_ty_yes2 {
20-
x: &'a uint //~ ERROR this lifetime must be declared
20+
x: &'a uint //~ ERROR only 'self is allowed
2121
}
2222

2323
fn main() {}

branches/try2/src/test/run-pass/issue-2904.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
/// Map representation
1414
15-
use core::io::ReaderUtil;
16-
1715
extern mod std;
1816

17+
use core::io::ReaderUtil;
18+
1919
enum square {
2020
bot,
2121
wall,

branches/try2/src/test/run-pass/trait-inheritance-num.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
// option. This file may not be copied, modified, or distributed
1111
// except according to those terms.
1212

13+
extern mod std;
14+
1315
use core::cmp::{Eq, Ord};
1416
use core::num::NumCast::from;
15-
16-
extern mod std;
1717
use std::cmp::FuzzyEq;
1818

1919
pub trait NumExt: NumCast + Eq + Ord {}

branches/try2/src/test/run-pass/trait-inheritance-num2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212

1313
// A more complex example of numeric extensions
1414

15+
extern mod std;
16+
1517
use core::cmp::{Eq, Ord};
1618
use core::num::NumCast::from;
17-
18-
extern mod std;
1919
use std::cmp::FuzzyEq;
2020

2121
pub trait TypeExt {}

0 commit comments

Comments
 (0)