Skip to content

Commit cc33682

Browse files
committed
---
yaml --- r: 50659 b: refs/heads/try c: 900a0c8 h: refs/heads/master i: 50657: 28ed90e 50655: ee2b777 v: v3
1 parent 47b1e34 commit cc33682

File tree

572 files changed

+7756
-4052
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

572 files changed

+7756
-4052
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 5f13e9ccc2e3328d4cd8ca49f84e6840dd998346
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: f7a2371c176663d59062ec5158f39faecba45768
5-
refs/heads/try: d8094f8602247927a39d33cbad13bdff3b2d467f
5+
refs/heads/try: 900a0c8df15162e750a6f34496dcf239d0848503
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/RELEASES.txt

Lines changed: 79 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,85 @@
1-
Version 0.6 (?)
1+
Version 0.6 (March 2013)
22
---------------------------
33

4+
* ~??? changes, numerous bugfixes
5+
6+
* TODO:
7+
* Ord/Cmp
8+
* Lifetime changes
9+
* Implicit self
10+
* Remove `static` keyword
11+
* Static method syntax
12+
* `as Trait`
13+
* `copy` removed?
14+
15+
* Syntax changes
16+
* The self type parameter in traits is now spelled `Self`
17+
* Replaced the `Durable` trait with the `'static` lifetime
18+
* The old closure type syntax with the trailing sigil has been
19+
removed in favor of the more consistent leading sigil
20+
* `super` is a keyword, and may be prefixed to paths
21+
* Trait bounds are separated with `+` instead of whitespace
22+
* Traits are implemented with `impl Trait for Type`
23+
instead of `impl Type: Trait`
24+
* The `export` keyword has finally been removed
25+
* The `move` keyword has been removed (linear types move by default)
26+
* The interior mutability qualifier on vectors, `[mut T]`, has been
27+
removed. Use `&mut [T]`, etc.
28+
* `mut` is no longer valid in `~mut T`. Use inherited mutability
29+
* `fail` is no longer a keyword. Use `fail!()`
30+
* `assert` is no longer a keyword. Use `assert!()`
31+
* `log` is no longer a keyword. use `debug!`, etc.
32+
* 1-tuples may be represented as `(T,)`
33+
* Struct fields may no longer be `mut`. Use inherited mutability,
34+
`@mut T`, `core::mut` or `core::cell`
35+
* `extern mod { ... }` is no longer valid syntax for foreign
36+
function modules. Use extern blocks: `extern { ... }`
37+
* Newtype enums removed. Used tuple-structs.
38+
* Trait implementations no longer support visibility modifiers
39+
40+
* Semantic changes
41+
* Linear types move by default, eliminating the `move` keyword
42+
* All foreign functions are considered unsafe
43+
* &mut is now unaliasable
44+
* Writes to borrowed @mut pointers are prevented dynamically
45+
* () has size 0
46+
* The name of the main function can be customized using #[main]
47+
* The default type of an inferred closure is &fn instead of @fn
48+
* Name resolution continues to be tweaked
49+
* Method visibility is inherited from the implementation declaration
50+
51+
* Other language changes
52+
* Structural records have been removed
53+
* Many more types can be used in constants, including enums
54+
`static lifetime pointers and vectors
55+
* Pattern matching over vectors improved and expanded
56+
* Typechecking of closure types has been overhauled to
57+
improve inference and eliminate unsoundness
58+
459
* Libraries
5-
* `core::send_map` renamed to `core::hashmap`
60+
* Lots of effort to organize the container API's around `core::container`
61+
* `core::send_map` renamed to `core::hashmap`
62+
* Added big integers to `std::bigint`
63+
* Removed `core::oldcomm` module
64+
* Added pipe-based `core::comm` module
65+
* Reimplemented `std::treemap`
66+
* Numeric traits have been reorganized under `core::num`
67+
* `core::dvec` removed. Use `@mut ~[T]` or other language types
68+
* `vec::slice` finally returns a slice
69+
* `debug!` and friends don't require a format string, e.g. `debug!(Foo)`
70+
71+
* Tools
72+
* Replaced the 'cargo' package manager with 'rustpkg'
73+
* Added all-purpose 'rust' tool
74+
* `rustc --test` now supports a benchmarks with the `#[bench]` attribute
75+
* rustc now attempts to offer spelling suggestions
76+
77+
* Misc
78+
* Improved support for ARM and Android
79+
* Preliminary MIPS backend
80+
* Improved foreign function ABI implementation for x86, x86_64
81+
* Various and memory usage improvements
82+
* Rust code may be embedded in foreign code under limited circumstances
683

784
Version 0.5 (December 2012)
885
---------------------------

branches/try/doc/rust.md

Lines changed: 16 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ do drop
212212
else enum extern
213213
false fn for
214214
if impl
215-
let log loop
215+
let loop
216216
match mod mut
217217
priv pub pure
218218
ref return
@@ -805,21 +805,20 @@ Use declarations support a number of "convenience" notations:
805805
An example of `use` declarations:
806806

807807
~~~~
808-
use foo = core::info;
809808
use core::float::sin;
810809
use core::str::{slice, to_upper};
811810
use core::option::Some;
812811
813812
fn main() {
814-
// Equivalent to 'log(core::info, core::float::sin(1.0));'
815-
log(foo, sin(1.0));
813+
// Equivalent to 'info!(core::float::sin(1.0));'
814+
info!(sin(1.0));
816815
817-
// Equivalent to 'log(core::info, core::option::Some(1.0));'
818-
log(info, Some(1.0));
816+
// Equivalent to 'info!(core::option::Some(1.0));'
817+
info!(Some(1.0));
819818
820-
// Equivalent to 'log(core::info,
821-
// core::str::to_upper(core::str::slice("foo", 0, 1)));'
822-
log(info, to_upper(slice("foo", 0, 1)));
819+
// Equivalent to
820+
// 'info!(core::str::to_upper(core::str::slice("foo", 0, 1)));'
821+
info!(to_upper(slice("foo", 0, 1)));
823822
}
824823
~~~~
825824

@@ -889,10 +888,10 @@ declared, in an angle-bracket-enclosed, comma-separated list following
889888
the function name.
890889

891890
~~~~ {.xfail-test}
892-
fn iter<T>(seq: &[T], f: fn(T)) {
891+
fn iter<T>(seq: &[T], f: &fn(T)) {
893892
for seq.each |elt| { f(elt); }
894893
}
895-
fn map<T, U>(seq: &[T], f: fn(T) -> U) -> ~[U] {
894+
fn map<T, U>(seq: &[T], f: &fn(T) -> U) -> ~[U] {
896895
let mut acc = ~[];
897896
for seq.each |elt| { acc.push(f(elt)); }
898897
acc
@@ -990,7 +989,7 @@ output slot type would normally be. For example:
990989

991990
~~~~
992991
fn my_err(s: &str) -> ! {
993-
log(info, s);
992+
info!(s);
994993
fail!();
995994
}
996995
~~~~
@@ -1198,7 +1197,7 @@ These appear after the trait name, using the same syntax used in [generic functi
11981197
trait Seq<T> {
11991198
fn len() -> uint;
12001199
fn elt_at(n: uint) -> T;
1201-
fn iter(fn(T));
1200+
fn iter(&fn(T));
12021201
}
12031202
~~~~
12041203

@@ -2074,7 +2073,7 @@ and moving values from the environment into the lambda expression's captured env
20742073
An example of a lambda expression:
20752074

20762075
~~~~
2077-
fn ten_times(f: fn(int)) {
2076+
fn ten_times(f: &fn(int)) {
20782077
let mut i = 0;
20792078
while i < 10 {
20802079
f(i);
@@ -2177,7 +2176,7 @@ If the `expr` is a [field expression](#field-expressions), it is parsed as thoug
21772176
In this example, both calls to `f` are equivalent:
21782177

21792178
~~~~
2180-
# fn f(f: fn(int)) { }
2179+
# fn f(f: &fn(int)) { }
21812180
# fn g(i: int) { }
21822181
21832182
f(|j| g(j));
@@ -2397,58 +2396,6 @@ fn max(a: int, b: int) -> int {
23972396
}
23982397
~~~~
23992398

2400-
### Log expressions
2401-
2402-
~~~~~~~~{.ebnf .gram}
2403-
log_expr : "log" '(' level ',' expr ')' ;
2404-
~~~~~~~~
2405-
2406-
Evaluating a `log` expression may, depending on runtime configuration, cause a
2407-
value to be appended to an internal diagnostic logging buffer provided by the
2408-
runtime or emitted to a system console. Log expressions are enabled or
2409-
disabled dynamically at run-time on a per-task and per-item basis. See
2410-
[logging system](#logging-system).
2411-
2412-
Each `log` expression must be provided with a *level* argument in
2413-
addition to the value to log. The logging level is a `u32` value, where
2414-
lower levels indicate more-urgent levels of logging. By default, the lowest
2415-
four logging levels (`1_u32 ... 4_u32`) are predefined as the constants
2416-
`error`, `warn`, `info` and `debug` in the `core` library.
2417-
2418-
Additionally, the macros `error!`, `warn!`, `info!` and `debug!` are defined
2419-
in the default syntax-extension namespace. These expand into calls to the
2420-
logging facility composed with calls to the `fmt!` string formatting
2421-
syntax-extension.
2422-
2423-
The following examples all produce the same output, logged at the `error`
2424-
logging level:
2425-
2426-
~~~~
2427-
# let filename = "bulbasaur";
2428-
2429-
// Full version, logging a value.
2430-
log(core::error, ~"file not found: " + filename);
2431-
2432-
// Log-level abbreviated, since core::* is used by default.
2433-
log(error, ~"file not found: " + filename);
2434-
2435-
// Formatting the message using a format-string and fmt!
2436-
log(error, fmt!("file not found: %s", filename));
2437-
2438-
// Using the error! macro, that expands to the previous call.
2439-
error!("file not found: %s", filename);
2440-
~~~~
2441-
2442-
A `log` expression is *not evaluated* when logging at the specified logging-level, module or task is disabled at runtime.
2443-
This makes inactive `log` expressions very cheap;
2444-
they should be used extensively in Rust code, as diagnostic aids,
2445-
as they add little overhead beyond a single integer-compare and branch at runtime.
2446-
2447-
Logging is presently implemented as a language built-in feature,
2448-
as it makes use of compiler-provided, per-module data tables and flags.
2449-
In the future, logging will move into a library, and will no longer be a core expression type.
2450-
It is therefore recommended to use the macro forms of logging (`error!`, `debug!`, etc.) to minimize disruption in code that uses logging.
2451-
24522399

24532400
# Type system
24542401

@@ -2755,7 +2702,7 @@ and the cast expression in `main`.
27552702
Within the body of an item that has type parameter declarations, the names of its type parameters are types:
27562703

27572704
~~~~~~~
2758-
fn map<A: Copy, B: Copy>(f: fn(A) -> B, xs: &[A]) -> ~[B] {
2705+
fn map<A: Copy, B: Copy>(f: &fn(A) -> B, xs: &[A]) -> ~[B] {
27592706
if xs.len() == 0 { return ~[]; }
27602707
let first: B = f(xs[0]);
27612708
let rest: ~[B] = map(f, xs.slice(1, xs.len()));
@@ -3149,7 +3096,7 @@ communication facilities.
31493096

31503097
The runtime contains a system for directing [logging
31513098
expressions](#log-expressions) to a logging console and/or internal logging
3152-
buffers. Logging expressions can be enabled per module.
3099+
buffers. Logging can be enabled per module.
31533100

31543101
Logging output is enabled by setting the `RUST_LOG` environment
31553102
variable. `RUST_LOG` accepts a logging specification made up of a

0 commit comments

Comments
 (0)