Skip to content

Commit ad24cdb

Browse files
committed
---
yaml --- r: 68547 b: refs/heads/auto c: 0fc99f1 h: refs/heads/master i: 68545: 58d5cc4 68543: fba6b30 v: v3
1 parent f41e19a commit ad24cdb

File tree

19 files changed

+131
-62
lines changed

19 files changed

+131
-62
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: a766a955a92dd162ebbcaef9ae0b9469ce1a326a
17+
refs/heads/auto: 0fc99f1997be9323bb75826c478094e74797ddf9
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ endif
139139

140140
# version-string calculation
141141
CFG_GIT_DIR := $(CFG_SRC_DIR).git
142-
CFG_RELEASE = 0.7
142+
CFG_RELEASE = 0.7-pre
143143
CFG_VERSION = $(CFG_RELEASE)
144144
# windows exe's need numeric versions - don't use anything but
145145
# numbers and dots here

branches/auto/RELEASES.txt

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,54 @@
11
Version 0.7 (July 2013)
22
-----------------------
33

4-
* ~2000 changes, numerous bugfixes
4+
* ??? changes, numerous bugfixes
55

6-
* Language
6+
* Syntax changes
77
* `impl`s no longer accept a visibility qualifier. Put them on methods
88
instead.
9+
* `use mod` is no longer valid.
10+
* `fail!` and `assert!` accept `~str`, `&'static str` or `fmt!`-style
11+
argument list.
12+
* `Encodable`, `Decodable`, `Ord`, `TotalOrd`, `TotalEq`, `DeepClone`,
13+
`Rand`, `Zero` and `ToStr` can all be automatically derived with
14+
`#[deriving(...)]`.
15+
* The `Durable` trait is replaced with the `'static` bounds.
16+
* At long last, 'argument modes' no longer exist.
17+
* The `bytes!` macro returns a vector of bytes for string, u8, char,
18+
and unsuffixed integer literals.
19+
* `#[static_assert]` makes compile-time assertions about static bools.
20+
21+
* Semantic changes
922
* The borrow checker has been rewritten with flow-sensitivity, fixing
1023
many bugs and inconveniences.
1124
* The `self` parameter no longer implicitly means `&'self self`,
1225
and can be explicitly marked with a lifetime.
13-
* Overloadable compound operators (`+=`, etc.) have been temporarily
14-
removed due to bugs.
26+
* Structs with the `#[packed]` attribute have byte alignment and
27+
no padding between fields.
1528
* The `for` loop protocol now requires `for`-iterators to return `bool`
1629
so they compose better.
17-
* The `Durable` trait is replaced with the `'static` bounds.
1830
* Trait default methods work more often.
19-
* Structs with the `#[packed]` attribute have byte alignment and
20-
no padding between fields.
2131
* Type parameters bound by `Copy` must now be copied explicitly with
2232
the `copy` keyword.
2333
* It is now illegal to move out of a dereferenced unsafe pointer.
2434
* `Option<~T>` is now represented as a nullable pointer.
2535
* `@mut` does dynamic borrow checks correctly.
36+
* Macros TODO
2637
* The `main` function is only detected at the topmost level of the crate.
2738
The `#[main]` attribute is still valid anywhere.
2839
* Struct fields may no longer be mutable. Use inherited mutability.
29-
* The `#[no_send]` attribute makes a type that would otherwise be
30-
`Send`, not.
31-
* The `#[no_freeze]` attribute makes a type that would otherwise be
32-
`Freeze`, not.
40+
* The `#[non_owned]` attribute makes a type that would otherwise be
41+
`Owned`, not. TODO this may change to non_send before 0.7
42+
* The `#[mutable]` attribute makes a type that would otherwise be
43+
`Const`, note. TODO this may change to non_freeze before 0.7
3344
* Unbounded recursion will abort the process after reaching the limit
3445
specified by the `RUST_MAX_STACK` environment variable (default: 1GB).
3546
* The `vecs_implicitly_copyable` lint mode has been removed. Vectors
3647
are never implicitly copyable.
37-
* `#[static_assert]` makes compile-time assertions about static bools.
38-
* At long last, 'argument modes' no longer exist.
39-
* The rarely used `use mod` statement no longer exists.
40-
41-
* Syntax extensions
42-
* `fail!` and `assert!` accept `~str`, `&'static str` or `fmt!`-style
43-
argument list.
44-
* `Encodable`, `Decodable`, `Ord`, `TotalOrd`, `TotalEq`, `DeepClone`,
45-
`Rand`, `Zero` and `ToStr` can all be automatically derived with
46-
`#[deriving(...)]`.
47-
* The `bytes!` macro returns a vector of bytes for string, u8, char,
48-
and unsuffixed integer literals.
4948

5049
* Libraries
5150
* The `core` crate was renamed to `std`.
5251
* The `std` crate was renamed to `extra`.
53-
* More and improved documentation.
5452
* std: `iterator` module for external iterator objects.
5553
* Many old-style (internal, higher-order function) iterators replaced by
5654
implementations of `Iterator`.
@@ -93,16 +91,8 @@ Version 0.7 (July 2013)
9391
* extra: Implementation of fixed output size variations of SHA-2.
9492

9593
* Tooling
96-
* `unused_variable` lint mode for unused variables (default: warn).
97-
* `unused_unsafe` lint mode for detecting unnecessary `unsafe` blocks
98-
(default: warn).
99-
* `unused_mut` lint mode for identifying unused `mut` qualifiers
100-
(default: warn).
101-
* `dead_assignment` lint mode for unread variables (default: warn).
102-
* `unnecessary_allocation` lint mode detects some heap allocations that are
103-
immediately borrowed so could be written without allocating (default: warn).
104-
* `missing_doc` lint mode (default: allow).
105-
* `unreachable_code` lint mode (default: warn).
94+
* `unused_unsafe` lint mode for detecting unnecessary `unsafe` blocks.
95+
* `unused_mut` lint mode for identifying unused `mut` qualifiers.
10696
* The `rusti` command has been rewritten and a number of bugs addressed.
10797
* rustc outputs in color on more terminals.
10898
* rustc accepts a `--link-args` flag to pass arguments to the linker.
@@ -111,7 +101,12 @@ Version 0.7 (July 2013)
111101
dynamic borrowcheck failures for debugging.
112102
* rustdoc has a nicer stylesheet.
113103
* Various improvements to rustdoc.
114-
* Improvements to rustpkg (see the detailed release notes).
104+
* Improvements to rustpkg (see the detailed release notes)
105+
106+
* Other
107+
* More and improved library documentation.
108+
* Various improvements on ARM and Android.
109+
* Various improvements to MIPS backend.
115110

116111
Version 0.6 (April 2013)
117112
------------------------

branches/auto/src/compiletest/compiletest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#[no_core]; // XXX: Remove after snapshot
1616
#[no_std];
1717

18-
extern mod core(name = "std", vers = "0.7");
19-
extern mod extra(name = "extra", vers = "0.7");
18+
extern mod core(name = "std", vers = "0.7-pre");
19+
extern mod extra(name = "extra", vers = "0.7-pre");
2020

2121
use core::prelude::*;
2222
use core::*;

branches/auto/src/driver/driver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#[no_core];
1212
#[no_std];
1313

14-
extern mod core(name = "std", vers = "0.7");
14+
extern mod core(name = "std", vers = "0.7-pre");
1515

1616
#[cfg(rustpkg)]
1717
extern mod this(name = "rustpkg");

branches/auto/src/etc/kate/rust.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!ENTITY rustIdent "[a-zA-Z_][a-zA-Z_0-9]*">
88
<!ENTITY rustIntSuf "([iu](8|16|32|64)?)?">
99
]>
10-
<language name="Rust" version="0.7" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
10+
<language name="Rust" version="0.7-pre" kateversion="2.4" section="Sources" extensions="*.rs;*.rc" mimetype="text/x-rust" priority="15">
1111
<highlighting>
1212
<list name="fn">
1313
<item> fn </item>

branches/auto/src/libextra/extra.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Rust extras are part of the standard Rust distribution.
2121
*/
2222

2323
#[link(name = "extra",
24-
vers = "0.7",
24+
vers = "0.7-pre",
2525
uuid = "122bed0b-c19b-4b82-b0b7-7ae8aead7297",
2626
url = "https://github.com/mozilla/rust/tree/master/src/libextra")];
2727

branches/auto/src/librust/rust.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// FIXME #2238 Make run only accept source that emits an executable
1414

1515
#[link(name = "rust",
16-
vers = "0.7",
16+
vers = "0.7-pre",
1717
uuid = "4a24da33-5cc8-4037-9352-2cbe9bd9d27c",
1818
url = "https://github.com/mozilla/rust/tree/master/src/rust")];
1919

branches/auto/src/librustc/front/std_inject.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use syntax::codemap::dummy_sp;
1818
use syntax::codemap;
1919
use syntax::fold;
2020

21-
static STD_VERSION: &'static str = "0.7";
21+
static STD_VERSION: &'static str = "0.7-pre";
2222

2323
pub fn maybe_inject_libstd_ref(sess: Session, crate: @ast::crate)
2424
-> @ast::crate {

branches/auto/src/librustc/front/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ mod __test {
271271
*/
272272

273273
fn mk_std(cx: &TestCtxt) -> @ast::view_item {
274-
let vers = ast::lit_str(@"0.7");
274+
let vers = ast::lit_str(@"0.7-pre");
275275
let vers = nospan(vers);
276276
let mi = ast::meta_name_value(@"vers", vers);
277277
let mi = nospan(mi);

branches/auto/src/librustc/rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010

1111
#[link(name = "rustc",
12-
vers = "0.7",
12+
vers = "0.7-pre",
1313
uuid = "0ce89b41-2f92-459e-bbc1-8f5fe32f16cf",
1414
url = "https://github.com/mozilla/rust/tree/master/src/rustc")];
1515

branches/auto/src/librustc/util/enum_set.rs

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

11+
use std::iterator::Iterator;
1112

1213
#[deriving(Eq, IterBytes)]
1314
pub struct EnumSet<E> {
@@ -73,6 +74,10 @@ impl<E:CLike> EnumSet<E> {
7374
}
7475
return true;
7576
}
77+
78+
pub fn iter(&self) -> EnumSetIterator<E> {
79+
EnumSetIterator::new(self.bits)
80+
}
7681
}
7782

7883
impl<E:CLike> Sub<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
@@ -93,6 +98,39 @@ impl<E:CLike> BitAnd<EnumSet<E>, EnumSet<E>> for EnumSet<E> {
9398
}
9499
}
95100

101+
pub struct EnumSetIterator<E> {
102+
priv index: uint,
103+
priv bits: uint,
104+
}
105+
106+
impl<E:CLike> EnumSetIterator<E> {
107+
fn new(bits: uint) -> EnumSetIterator<E> {
108+
EnumSetIterator { index: 0, bits: bits }
109+
}
110+
}
111+
112+
impl<E:CLike> Iterator<E> for EnumSetIterator<E> {
113+
fn next(&mut self) -> Option<E> {
114+
if (self.bits == 0) {
115+
return None;
116+
}
117+
118+
while (self.bits & 1) == 0 {
119+
self.index += 1;
120+
self.bits >>= 1;
121+
}
122+
let elem = CLike::from_uint(self.index);
123+
self.index += 1;
124+
self.bits >>= 1;
125+
Some(elem)
126+
}
127+
128+
fn size_hint(&self) -> (Option<uint>, Option<uint>) {
129+
let exact = Some(self.bits.population_count());
130+
(exact, exact)
131+
}
132+
}
133+
96134
#[cfg(test)]
97135
mod test {
98136

@@ -199,25 +237,58 @@ mod test {
199237
}
200238

201239
///////////////////////////////////////////////////////////////////////////
202-
// each
240+
// iterator
241+
242+
#[test]
243+
fn test_iterator() {
244+
let mut e1: EnumSet<Foo> = EnumSet::empty();
245+
246+
let elems: ~[Foo] = e1.iter().collect();
247+
assert_eq!(~[], elems)
248+
249+
e1.add(A);
250+
let elems: ~[Foo] = e1.iter().collect();
251+
assert_eq!(~[A], elems)
252+
253+
e1.add(C);
254+
let elems: ~[Foo] = e1.iter().collect();
255+
assert_eq!(~[A,C], elems)
256+
257+
e1.add(C);
258+
let elems: ~[Foo] = e1.iter().collect();
259+
assert_eq!(~[A,C], elems)
260+
261+
e1.add(B);
262+
let elems: ~[Foo] = e1.iter().collect();
263+
assert_eq!(~[A,B,C], elems)
264+
}
265+
266+
fn collect(e: EnumSet<Foo>) -> ~[Foo] {
267+
let mut elems = ~[];
268+
e.each(|elem| {
269+
elems.push(elem);
270+
true
271+
});
272+
elems
273+
}
203274

204275
#[test]
205276
fn test_each() {
206277
let mut e1: EnumSet<Foo> = EnumSet::empty();
207278

208-
assert_eq!(~[], iter::FromIter::from_iter::<Foo, ~[Foo]>(|f| e1.each(f)))
279+
assert_eq!(~[], collect(e1))
209280

210281
e1.add(A);
211-
assert_eq!(~[A], iter::FromIter::from_iter::<Foo, ~[Foo]>(|f| e1.each(f)))
282+
assert_eq!(~[A], collect(e1))
212283

213284
e1.add(C);
214-
assert_eq!(~[A,C], iter::FromIter::from_iter::<Foo, ~[Foo]>(|f| e1.each(f)))
285+
assert_eq!(~[A,C], collect(e1))
215286

216287
e1.add(C);
217-
assert_eq!(~[A,C], iter::FromIter::from_iter::<Foo, ~[Foo]>(|f| e1.each(f)))
288+
assert_eq!(~[A,C], collect(e1))
218289

219290
e1.add(B);
220-
assert_eq!(~[A,B,C], iter::FromIter::from_iter::<Foo, ~[Foo]>(|f| e1.each(f)))
291+
assert_eq!(~[A,B,C], collect(e1))
221292
}
222293

223294
///////////////////////////////////////////////////////////////////////////
@@ -234,12 +305,15 @@ mod test {
234305
e2.add(C);
235306

236307
let e_union = e1 | e2;
237-
assert_eq!(~[A,B,C], iter::FromIter::from_iter::<Foo, ~[Foo]>(|f| e_union.each(f)))
308+
let elems: ~[Foo] = e_union.iter().collect();
309+
assert_eq!(~[A,B,C], elems)
238310

239311
let e_intersection = e1 & e2;
240-
assert_eq!(~[C], iter::FromIter::from_iter::<Foo, ~[Foo]>(|f| e_intersection.each(f)))
312+
let elems: ~[Foo] = e_intersection.iter().collect();
313+
assert_eq!(~[C], elems)
241314

242315
let e_subtract = e1 - e2;
243-
assert_eq!(~[A], iter::FromIter::from_iter::<Foo, ~[Foo]>(|f| e_subtract.each(f)))
316+
let elems: ~[Foo] = e_subtract.iter().collect();
317+
assert_eq!(~[A], elems)
244318
}
245319
}

branches/auto/src/librustdoc/rustdoc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! Rustdoc - The Rust documentation generator
1212
1313
#[link(name = "rustdoc",
14-
vers = "0.7",
14+
vers = "0.7-pre",
1515
uuid = "f8abd014-b281-484d-a0c3-26e3de8e2412",
1616
url = "https://github.com/mozilla/rust/tree/master/src/rustdoc")];
1717

branches/auto/src/librusti/rusti.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
*/
4545

4646
#[link(name = "rusti",
47-
vers = "0.7",
47+
vers = "0.7-pre",
4848
uuid = "7fb5bf52-7d45-4fee-8325-5ad3311149fc",
4949
url = "https://github.com/mozilla/rust/tree/master/src/rusti")];
5050

branches/auto/src/librusti/rusti.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
*/
4545

4646
#[link(name = "rusti",
47-
vers = "0.7",
47+
vers = "0.7-pre",
4848
uuid = "7fb5bf52-7d45-4fee-8325-5ad3311149fc",
4949
url = "https://github.com/mozilla/rust/tree/master/src/rusti")];
5050

branches/auto/src/librustpkg/rustpkg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// rustpkg - a package manager and build system for Rust
1212

1313
#[link(name = "rustpkg",
14-
vers = "0.7",
14+
vers = "0.7-pre",
1515
uuid = "25de5e6e-279e-4a20-845c-4cabae92daaf",
1616
url = "https://github.com/mozilla/rust/tree/master/src/librustpkg")];
1717

branches/auto/src/libstd/std.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ they contained the following prologue:
4949

5050

5151
#[link(name = "std",
52-
vers = "0.7",
52+
vers = "0.7-pre",
5353
uuid = "c70c24a7-5551-4f73-8e37-380b11d80be8",
5454
url = "https://github.com/mozilla/rust/tree/master/src/libstd")];
5555

branches/auto/src/libsyntax/syntax.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*/
1515

1616
#[link(name = "syntax",
17-
vers = "0.7",
17+
vers = "0.7-pre",
1818
uuid = "9311401b-d6ea-4cd9-a1d9-61f89499c645")];
1919

2020
#[license = "MIT/ASL2"];

0 commit comments

Comments
 (0)