Skip to content

Commit 5c75d4b

Browse files
committed
---
yaml --- r: 51579 b: refs/heads/incoming c: d049bf2 h: refs/heads/master i: 51577: 79cb15b 51575: 41ccfc2 v: v3
1 parent 71fb9ee commit 5c75d4b

16 files changed

+67
-70
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 8eb2bab100b42f0ba751552d8eff00eb2134c55a
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/incoming: b6f9aa1fd75f0e9468b3bb9ee10a95d18c40b567
9+
refs/heads/incoming: d049bf249253230b6312400b8a919af0c14204c4
1010
refs/heads/dist-snap: 8b98e5a296d95c5e832db0756828e5bec31c6f50
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/RELEASES.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ Version 0.6 (March 2013)
66
* TODO:
77
* Ord/Cmp
88
* Lifetime changes
9-
* Implicit self
109
* Remove `static` keyword
1110
* Static method syntax
1211
* `as Trait`
1312
* `copy` removed, replaced with `Clone`?
14-
* `std::map` removed, replaced with `core::hashmap`
13+
* More details for "Name resolution continues to be tweaked"?
1514

1615
* Syntax changes
1716
* The self type parameter in traits is now spelled `Self`
17+
* The `self` parameter in trait and impl methods must now be explicitly
18+
named (for example: `fn f(&self) { }`). Implicit self is deprecated.
1819
* Replaced the `Durable` trait with the `'static` lifetime
1920
* The old closure type syntax with the trailing sigil has been
2021
removed in favor of the more consistent leading sigil
@@ -23,7 +24,7 @@ Version 0.6 (March 2013)
2324
* Traits are implemented with `impl Trait for Type`
2425
instead of `impl Type: Trait`
2526
* The `export` keyword has finally been removed
26-
* The `move` keyword has been removed (linear types move by default)
27+
* The `move` keyword has been removed (see "Semantic changes")
2728
* The interior mutability qualifier on vectors, `[mut T]`, has been
2829
removed. Use `&mut [T]`, etc.
2930
* `mut` is no longer valid in `~mut T`. Use inherited mutability
@@ -37,6 +38,7 @@ Version 0.6 (March 2013)
3738
function modules. Use extern blocks: `extern { ... }`
3839
* Newtype enums removed. Used tuple-structs.
3940
* Trait implementations no longer support visibility modifiers
41+
* Pattern matching over vectors improved and expanded
4042

4143
* Semantic changes
4244
* Types with owned pointers or custom destructors move by default,
@@ -49,12 +51,9 @@ Version 0.6 (March 2013)
4951
* The default type of an inferred closure is &fn instead of @fn
5052
* Name resolution continues to be tweaked
5153
* Method visibility is inherited from the implementation declaration
52-
53-
* Other language changes
5454
* Structural records have been removed
55-
* Many more types can be used in constants, including enums
55+
* Many more types can be used in constants, including enums,
5656
`static lifetime pointers and vectors
57-
* Pattern matching over vectors improved and expanded
5857
* Typechecking of closure types has been overhauled to
5958
improve inference and eliminate unsoundness
6059

@@ -68,6 +67,7 @@ Version 0.6 (March 2013)
6867
* Containers reorganized around traits in `core::container`
6968
* `core::dvec` removed, `~[T]` is a drop-in replacement
7069
* `core::send_map` renamed to `core::hashmap`
70+
* `std::map` removed; replaced with `core::hashmap`
7171
* `std::treemap` reimplemented as an owned balanced tree
7272
* `std::deque` and `std::smallintmap` reimplemented as owned containers
7373
* `core::trie` added as a fast ordered map for integer keys
@@ -76,14 +76,14 @@ Version 0.6 (March 2013)
7676
* Tools
7777
* Replaced the 'cargo' package manager with 'rustpkg'
7878
* Added all-purpose 'rust' tool
79-
* `rustc --test` now supports a benchmarks with the `#[bench]` attribute
79+
* `rustc --test` now supports benchmarks with the `#[bench]` attribute
8080
* rustc now attempts to offer spelling suggestions
8181

8282
* Misc
8383
* Improved support for ARM and Android
8484
* Preliminary MIPS backend
8585
* Improved foreign function ABI implementation for x86, x86_64
86-
* Various and memory usage improvements
86+
* Various memory usage improvements
8787
* Rust code may be embedded in foreign code under limited circumstances
8888

8989
Version 0.5 (December 2012)

branches/incoming/src/librustc/middle/kind.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ pub fn check_bounds(cx: Context,
376376

377377
ty::bound_durable => {
378378
if !kind.is_durable(cx.tcx) {
379-
missing.push("'static");
379+
missing.push("&static");
380380
}
381381
}
382382

@@ -467,7 +467,7 @@ pub fn check_durable(tcx: ty::ctxt, ty: ty::t, sp: span) -> bool {
467467
match ty::get(ty).sty {
468468
ty::ty_param(*) => {
469469
tcx.sess.span_err(sp, ~"value may contain borrowed \
470-
pointers; use `'static` bound");
470+
pointers; use `&static` bound");
471471
}
472472
_ => {
473473
tcx.sess.span_err(sp, ~"value may contain borrowed \

branches/incoming/src/librustc/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ pub fn substs_to_str(cx: ctxt, substs: &substs) -> ~str {
14041404
pub fn param_bound_to_str(cx: ctxt, pb: &param_bound) -> ~str {
14051405
match *pb {
14061406
bound_copy => ~"copy",
1407-
bound_durable => ~"'static",
1407+
bound_durable => ~"&static",
14081408
bound_owned => ~"owned",
14091409
bound_const => ~"const",
14101410
bound_trait(t) => ::util::ppaux::ty_to_str(cx, t)

branches/incoming/src/libsyntax/parse/parser.rs

Lines changed: 37 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2704,52 +2704,49 @@ pub impl Parser {
27042704

27052705
let mut result = opt_vec::Empty;
27062706
loop {
2707-
match *self.token {
2708-
token::LIFETIME(lifetime) => {
2709-
if str::eq_slice(*self.id_to_str(lifetime), "static") {
2710-
result.push(RegionTyParamBound);
2711-
} else {
2712-
self.span_err(*self.span,
2713-
~"`'static` is the only permissible \
2714-
region bound here");
2715-
}
2716-
self.bump();
2707+
if self.eat(&token::BINOP(token::AND)) {
2708+
if self.eat_keyword(&~"static") {
2709+
result.push(RegionTyParamBound);
2710+
} else {
2711+
self.span_err(*self.span,
2712+
~"`&static` is the only permissible \
2713+
region bound here");
27172714
}
2718-
token::IDENT(*) => {
2719-
let maybe_bound = match *self.token {
2720-
token::IDENT(copy sid, _) => {
2721-
match *self.id_to_str(sid) {
2722-
~"send" |
2723-
~"copy" |
2724-
~"const" |
2725-
~"owned" => {
2726-
self.obsolete(
2727-
*self.span,
2728-
ObsoleteLowerCaseKindBounds);
2729-
2730-
// Bogus value, but doesn't matter, since
2731-
// is an error
2732-
Some(TraitTyParamBound(
2733-
self.mk_ty_path(sid)))
2734-
}
2735-
_ => None
2715+
} else if is_ident(&*self.token) {
2716+
let maybe_bound = match *self.token {
2717+
token::IDENT(copy sid, _) => {
2718+
match *self.id_to_str(sid) {
2719+
~"send" |
2720+
~"copy" |
2721+
~"const" |
2722+
~"owned" => {
2723+
self.obsolete(
2724+
*self.span,
2725+
ObsoleteLowerCaseKindBounds);
2726+
2727+
// Bogus value, but doesn't matter, since
2728+
// is an error
2729+
Some(TraitTyParamBound(
2730+
self.mk_ty_path(sid)))
27362731
}
2732+
_ => None
27372733
}
2738-
_ => fail!()
2739-
};
2734+
}
2735+
_ => fail!()
2736+
};
27402737

2741-
match maybe_bound {
2742-
Some(bound) => {
2743-
self.bump();
2744-
result.push(bound);
2745-
}
2746-
None => {
2747-
let ty = self.parse_ty(false);
2748-
result.push(TraitTyParamBound(ty));
2749-
}
2738+
match maybe_bound {
2739+
Some(bound) => {
2740+
self.bump();
2741+
result.push(bound);
2742+
}
2743+
None => {
2744+
let ty = self.parse_ty(false);
2745+
result.push(TraitTyParamBound(ty));
27502746
}
27512747
}
2752-
_ => break,
2748+
} else {
2749+
break;
27532750
}
27542751

27552752
if self.eat(&token::BINOP(token::PLUS)) {

branches/incoming/src/libsyntax/print/pprust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1755,7 +1755,7 @@ pub fn print_bounds(s: @ps, bounds: @OptVec<ast::TyParamBound>) {
17551755
17561756
match *bound {
17571757
TraitTyParamBound(ty) => print_type(s, ty),
1758-
RegionTyParamBound => word(s.s, ~"'static"),
1758+
RegionTyParamBound => word(s.s, ~"&static"),
17591759
}
17601760
}
17611761
}

branches/incoming/src/test/compile-fail/kindck-owned-trait-scoped.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ fn to_foo_2<T:Copy>(t: T) -> @foo {
3737
// Not OK---T may contain borrowed ptrs and it is going to escape
3838
// as part of the returned foo value
3939
struct F<T> { f: T }
40-
@F {f:t} as @foo //~ ERROR value may contain borrowed pointers; use `'static` bound
40+
@F {f:t} as @foo //~ ERROR value may contain borrowed pointers; use `&static` bound
4141
}
4242

43-
fn to_foo_3<T:Copy + 'static>(t: T) -> @foo {
43+
fn to_foo_3<T:Copy + &static>(t: T) -> @foo {
4444
// OK---T may escape as part of the returned foo value, but it is
4545
// owned and hence does not contain borrowed ptrs
4646
struct F<T> { f: T }

branches/incoming/src/test/compile-fail/kindck-owned-trait.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
trait foo { fn foo(&self); }
1212

1313
fn to_foo<T:Copy + foo>(t: T) -> @foo {
14-
@t as @foo //~ ERROR value may contain borrowed pointers; use `'static` bound
14+
@t as @foo //~ ERROR value may contain borrowed pointers; use `&static` bound
1515
}
1616

17-
fn to_foo2<T:Copy + foo + 'static>(t: T) -> @foo {
17+
fn to_foo2<T:Copy + foo + &static>(t: T) -> @foo {
1818
@t as @foo
1919
}
2020

branches/incoming/src/test/compile-fail/kindck-owned.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@ fn copy1<T:Copy>(t: T) -> @fn() -> T {
1313
result
1414
}
1515

16-
fn copy2<T:Copy + 'static>(t: T) -> @fn() -> T {
16+
fn copy2<T:Copy + &static>(t: T) -> @fn() -> T {
1717
let result: @fn() -> T = || t;
1818
result
1919
}
2020

2121
fn main() {
2222
let x = &3;
23-
copy2(&x); //~ ERROR does not fulfill `'static`
23+
copy2(&x); //~ ERROR does not fulfill `&static`
2424

2525
copy2(@3);
26-
copy2(@&x); //~ ERROR does not fulfill `'static`
26+
copy2(@&x); //~ ERROR does not fulfill `&static`
2727

2828
let boxed: @fn() = || {};
2929
copy2(boxed);
3030
let owned: ~fn() = || {};
3131
copy2(owned); //~ ERROR does not fulfill `Copy`
3232
let borrowed: &fn() = || {};
33-
copy2(borrowed); //~ ERROR does not fulfill `'static`
33+
copy2(borrowed); //~ ERROR does not fulfill `&static`
3434
}

branches/incoming/src/test/compile-fail/static-region-bound.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
fn f<T:'static>(_: T) {}
1+
fn f<T:&static>(_: T) {}
22

33
fn main() {
44
let x = @3;

branches/incoming/src/test/run-pass/alignment-gep-tup-like-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ struct pair<A,B> {
1212
a: A, b: B
1313
}
1414

15-
fn f<A:Copy + 'static>(a: A, b: u16) -> @fn() -> (A, u16) {
15+
fn f<A:Copy + &static>(a: A, b: u16) -> @fn() -> (A, u16) {
1616
let result: @fn() -> (A, u16) = || (a, b);
1717
result
1818
}

branches/incoming/src/test/run-pass/close-over-big-then-small-data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct Pair<A,B> {
1616
a: A, b: B
1717
}
1818

19-
fn f<A:Copy + 'static>(a: A, b: u16) -> @fn() -> (A, u16) {
19+
fn f<A:Copy + &static>(a: A, b: u16) -> @fn() -> (A, u16) {
2020
let result: @fn() -> (A, u16) = || (a, b);
2121
result
2222
}

branches/incoming/src/test/run-pass/fixed-point-bind-unique.rs

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

1111
// xfail-fast
1212

13-
fn fix_help<A:'static,B:Owned>(f: extern fn(@fn(A) -> B, A) -> B, x: A) -> B {
13+
fn fix_help<A:&static,B:Owned>(f: extern fn(@fn(A) -> B, A) -> B, x: A) -> B {
1414
return f(|a| fix_help(f, a), x);
1515
}
1616

17-
fn fix<A:'static,B:Owned>(f: extern fn(@fn(A) -> B, A) -> B) -> @fn(A) -> B {
17+
fn fix<A:&static,B:Owned>(f: extern fn(@fn(A) -> B, A) -> B) -> @fn(A) -> B {
1818
return |a| fix_help(f, a);
1919
}
2020

branches/incoming/src/test/run-pass/issue-2734.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
trait hax { }
1212
impl<A> hax for A { }
1313

14-
fn perform_hax<T:'static>(x: @T) -> @hax {
14+
fn perform_hax<T:&static>(x: @T) -> @hax {
1515
@x as @hax
1616
}
1717

branches/incoming/src/test/run-pass/issue-2735.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
trait hax { }
1212
impl<A> hax for A { }
1313

14-
fn perform_hax<T:'static>(x: @T) -> @hax {
14+
fn perform_hax<T:&static>(x: @T) -> @hax {
1515
@x as @hax
1616
}
1717

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ fn square_from_char(c: char) -> square {
5959
}
6060
}
6161

62-
fn read_board_grid<rdr:'static + io::Reader>(+in: rdr) -> ~[~[square]] {
62+
fn read_board_grid<rdr: &static + io::Reader>(+in: rdr) -> ~[~[square]] {
6363
let in = @in as @io::Reader;
6464
let mut grid = ~[];
6565
for in.each_line |line| {

0 commit comments

Comments
 (0)