Skip to content

Commit 92d875a

Browse files
committed
---
yaml --- r: 139291 b: refs/heads/try2 c: 043150b h: refs/heads/master i: 139289: bea7e4e 139287: 0f6e141 v: v3
1 parent 8b68971 commit 92d875a

Some content is hidden

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

51 files changed

+558
-381
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: de7d5589441d4f0fe8c4f083b6fa9dbfac451398
8+
refs/heads/try2: 043150b9ab29e46d0dbee36e53737915a09163b7
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/RELEASES.txt

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Version 0.6 (March 2013)
22
---------------------------
33

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

66
* TODO:
77
* Ord/Cmp
@@ -39,11 +39,6 @@ Version 0.6 (March 2013)
3939
* Newtype enums removed. Used tuple-structs.
4040
* Trait implementations no longer support visibility modifiers
4141
* Pattern matching over vectors improved and expanded
42-
* `const` renamed to `static` to correspond to lifetime name,
43-
and make room for future `static mut` unsafe mutable globals.
44-
* Replaced `#[deriving_eq]` with `#[deriving(Eq)]`
45-
* `Clone` implementations can be automatically generated with
46-
`#[deriving(Clone)]`
4742

4843
* Semantic changes
4944
* Types with owned pointers or custom destructors move by default,
@@ -57,9 +52,8 @@ Version 0.6 (March 2013)
5752
* Name resolution continues to be tweaked
5853
* Method visibility is inherited from the implementation declaration
5954
* Structural records have been removed
60-
* Many more types can be used in static items, including enums
61-
'static-lifetime pointers and vectors
62-
* Pattern matching over vectors improved and expanded
55+
* Many more types can be used in constants, including enums,
56+
`static lifetime pointers and vectors
6357
* Typechecking of closure types has been overhauled to
6458
improve inference and eliminate unsoundness
6559

@@ -91,7 +85,6 @@ Version 0.6 (March 2013)
9185
* Improved foreign function ABI implementation for x86, x86_64
9286
* Various memory usage improvements
9387
* Rust code may be embedded in foreign code under limited circumstances
94-
* Inline assembler supported by new asm!() syntax extension.
9588

9689
Version 0.5 (December 2012)
9790
---------------------------

branches/try2/configure

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -444,13 +444,12 @@ fi
444444

445445
if [ ! -z "$CFG_PANDOC" ]
446446
then
447-
PV_MAJOR_MINOR=$(pandoc --version | grep '^pandoc ' |
448-
# extract the first 2 version fields, ignore everything else
449-
sed 's/pandoc \([0-9]*\)\.\([0-9]*\).*/\1 \2/')
450-
451-
# these patterns are shell globs, *not* regexps
452-
PV_MAJOR=${PV_MAJOR_MINOR% *}
453-
PV_MINOR=${PV_MAJOR_MINOR#* }
447+
PANDOC_VER_LINE=$(pandoc --version | grep '^pandoc ')
448+
PANDOC_VER=${PANDOC_VER_LINE#pandoc }
449+
PV_MAJOR_MINOR=${PANDOC_VER%.[0-9]*}
450+
PV_MAJOR=${PV_MAJOR_MINOR%%[.][0-9]*}
451+
PV_MINOR=${PV_MAJOR_MINOR#[0-9]*[.]}
452+
PV_MINOR=${PV_MINOR%%[.][0-9]*}
454453
if [ "$PV_MAJOR" -lt "1" ] || [ "$PV_MINOR" -lt "8" ]
455454
then
456455
step_msg "pandoc $PV_MAJOR.$PV_MINOR is too old. disabling"
@@ -575,7 +574,6 @@ fi
575574
CFG_PREFIX=${CFG_PREFIX%/}
576575
CFG_HOST_TRIPLES="$(echo $CFG_HOST_TRIPLES | tr ',' ' ')"
577576
CFG_TARGET_TRIPLES="$(echo $CFG_TARGET_TRIPLES | tr ',' ' ')"
578-
CFG_SUPPORTED_TARGET_TRIPLES="$(grep ^CC_*=* $CFG_SRC_DIR/mk/platform.mk | sed 's,^[^_]*_,,' | sed 's/\([^=]*\).*/\1/' | xargs)"
579577

580578
# copy host-triples to target-triples so that hosts are a subset of targets
581579
V_TEMP=""
@@ -588,22 +586,8 @@ CFG_TARGET_TRIPLES=$V_TEMP
588586
# check target-specific tool-chains
589587
for i in $CFG_TARGET_TRIPLES
590588
do
591-
L_CHECK=false
592-
for j in $CFG_SUPPORTED_TARGET_TRIPLES
593-
do
594-
if [ $i = $j ]
595-
then
596-
L_CHECK=true
597-
fi
598-
done
599-
600-
if [ $L_CHECK = false ]
601-
then
602-
err "unsupported target triples \"$i\" found"
603-
fi
604-
605589
case $i in
606-
arm-linux-androideabi)
590+
arm-unknown-android)
607591

608592
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-gcc ]
609593
then

branches/try2/doc/rust.md

Lines changed: 16 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -617,8 +617,8 @@ each of which may have some number of [attributes](#attributes) attached to it.
617617
## Items
618618

619619
~~~~~~~~ {.ebnf .gram}
620-
item : mod_item | fn_item | type_item | struct_item | enum_item
621-
| static_item | trait_item | impl_item | foreign_mod_item ;
620+
item : mod_item | fn_item | type_item | enum_item
621+
| const_item | trait_item | impl_item | foreign_mod_item ;
622622
~~~~~~~~
623623

624624
An _item_ is a component of a crate; some module items can be defined in crate
@@ -627,7 +627,7 @@ crate by a nested set of [modules](#modules). Every crate has a single
627627
"outermost" anonymous module; all further items within the crate have
628628
[paths](#paths) within the module tree of the crate.
629629

630-
Items are entirely determined at compile-time, generally remain fixed during
630+
Items are entirely determined at compile-time, remain constant during
631631
execution, and may reside in read-only memory.
632632

633633
There are several kinds of item:
@@ -637,7 +637,7 @@ There are several kinds of item:
637637
* [type definitions](#type-definitions)
638638
* [structures](#structures)
639639
* [enumerations](#enumerations)
640-
* [static items](#static-items)
640+
* [constants](#constants)
641641
* [traits](#traits)
642642
* [implementations](#implementations)
643643

@@ -1091,23 +1091,21 @@ a = Cat{ name: ~"Spotty", weight: 2.7 };
10911091
In this example, `Cat` is a _struct-like enum variant_,
10921092
whereas `Dog` is simply called an enum variant.
10931093

1094-
### Static items
1094+
### Constants
10951095

10961096
~~~~~~~~ {.ebnf .gram}
1097-
static_item : "static" ident ':' type '=' expr ';' ;
1097+
const_item : "const" ident ':' type '=' expr ';' ;
10981098
~~~~~~~~
10991099

1100-
A *static item* is a named _constant value_ stored in the global data section of a crate.
1101-
Immutable static items are stored in the read-only data section.
1102-
The constant value bound to a static item is, like all constant values, evaluated at compile time.
1103-
Static items have the `static` lifetime, which outlives all other lifetimes in a Rust program.
1104-
Static items are declared with the `static` keyword.
1105-
A static item must have a _constant expression_ giving its definition.
1100+
A *constant* is a named value stored in read-only memory in a crate.
1101+
The value bound to a constant is evaluated at compile time.
1102+
Constants are declared with the `static` keyword.
1103+
A constant item must have an expression giving its definition.
1104+
The definition expression of a constant is limited to expression forms that can be evaluated at compile time.
11061105

1107-
Static items must be explicitly typed.
1108-
The type may be ```bool```, ```char```, a number, or a type derived from those primitive types.
1109-
The derived types are borrowed pointers with the `'static` lifetime,
1110-
fixed-size arrays, tuples, and structs.
1106+
Constants must be explicitly typed. The type may be ```bool```, ```char```, a number, or a type derived from those primitive types.
1107+
The derived types are borrowed pointers, static arrays, tuples, and structs.
1108+
Borrowed pointers must be have the `'static` lifetime.
11111109

11121110
~~~~
11131111
static bit1: uint = 1 << 0;
@@ -1458,7 +1456,7 @@ The declared names may denote new slots or new items.
14581456

14591457
An _item declaration statement_ has a syntactic form identical to an
14601458
[item](#items) declaration within a module. Declaring an item -- a function,
1461-
enumeration, structure, type, static, trait, implementation or module -- locally
1459+
enumeration, type, constant, trait, implementation or module -- locally
14621460
within a statement block is simply a way of restricting its scope to a narrow
14631461
region containing all of its uses; it is otherwise identical in meaning to
14641462
declaring the item outside the statement block.
@@ -1671,10 +1669,6 @@ vec_elems : [expr [',' expr]*] | [expr ',' ".." expr]
16711669
A [_vector_](#vector-types) _expression_ is written by enclosing zero or
16721670
more comma-separated expressions of uniform type in square brackets.
16731671

1674-
In the `[expr ',' ".." expr]` form, the expression after the `".."`
1675-
must be a constant expression that can be evaluated at compile time, such
1676-
as a [literal](#literals) or a [static item](#static-items).
1677-
16781672
~~~~
16791673
[1, 2, 3, 4];
16801674
["a", "b", "c", "d"];
@@ -2160,19 +2154,6 @@ do f |j| {
21602154
}
21612155
~~~~
21622156

2163-
In this example, both calls to the (binary) function `k` are equivalent:
2164-
2165-
~~~~
2166-
# fn k(x:int, f: &fn(int)) { }
2167-
# fn l(i: int) { }
2168-
2169-
k(3, |j| l(j));
2170-
2171-
do k(3) |j| {
2172-
l(j);
2173-
}
2174-
~~~~
2175-
21762157

21772158
### For expressions
21782159

@@ -2201,7 +2182,7 @@ and early boolean-valued returns from the `block` function,
22012182
such that the meaning of `break` and `loop` is preserved in a primitive loop
22022183
when rewritten as a `for` loop controlled by a higher order function.
22032184

2204-
An example of a for loop over the contents of a vector:
2185+
An example a for loop:
22052186

22062187
~~~~
22072188
# type foo = int;
@@ -2215,14 +2196,6 @@ for v.each |e| {
22152196
}
22162197
~~~~
22172198

2218-
An example of a for loop over a series of integers:
2219-
2220-
~~~~
2221-
# fn bar(b:uint) { }
2222-
for uint::range(0, 256) |i| {
2223-
bar(i);
2224-
}
2225-
~~~~
22262199

22272200
### If expressions
22282201

@@ -2499,7 +2472,6 @@ fail_unless!(b != "world");
24992472

25002473
The vector type constructor represents a homogeneous array of values of a given type.
25012474
A vector has a fixed size.
2502-
(Operations like `vec::push` operate solely on owned vectors.)
25032475
A vector type can be annotated with a _definite_ size,
25042476
written with a trailing asterisk and integer literal, such as `[int * 10]`.
25052477
Such a definite-sized vector type is a first-class type, since its size is known statically.
@@ -2510,10 +2482,6 @@ such as `&[T]`, `@[T]` or `~[T]`.
25102482
The kind of a vector type depends on the kind of its element type,
25112483
as with other simple structural types.
25122484

2513-
Expressions producing vectors of definite size cannot be evaluated in a
2514-
context expecting a vector of indefinite size; one must copy the
2515-
definite-sized vector contents into a distinct vector of indefinite size.
2516-
25172485
An example of a vector type and its use:
25182486

25192487
~~~~

branches/try2/doc/tutorial-borrowed-ptr.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,11 @@ overwritten for the duration of the borrow. In fact, the compiler
468468
would accept the example we gave earlier. The example is safe because
469469
the shape pointer has type `&Shape`, which means "borrowed pointer to
470470
immutable memory containing a `shape`". If, however, the type of that
471-
pointer were `&mut Shape`, then the ref binding would be ill-typed.
472-
Just as with unique boxes, the compiler will permit `ref` bindings
473-
into data owned by the stack frame even if the data are mutable,
474-
but otherwise it requires that the data reside in immutable memory.
471+
pointer were `&const Shape` or `&mut Shape`, then the ref binding
472+
would be ill-typed. Just as with unique boxes, the compiler will
473+
permit `ref` bindings into data owned by the stack frame even if the
474+
data are mutable, but otherwise it requires that the data reside in
475+
immutable memory.
475476

476477
# Returning borrowed pointers
477478

branches/try2/doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ while count < 10 {
234234

235235
Although Rust can almost always infer the types of local variables, you
236236
can specify a variable's type by following it with a colon, then the type
237-
name. Static items, on the other hand, always require a type annotation.
237+
name. Constants, on the other hand, always require a type annotation.
238238

239239
~~~~
240240
static monster_factor: float = 57.8;

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<list name="keywords">
1919
<item> as </item>
2020
<item> break </item>
21+
<item> const </item>
2122
<item> copy </item>
2223
<item> do </item>
2324
<item> drop </item>
@@ -28,17 +29,18 @@
2829
<item> if </item>
2930
<item> impl </item>
3031
<item> let </item>
32+
<item> log </item>
3133
<item> loop </item>
3234
<item> match </item>
3335
<item> mod </item>
3436
<item> mut </item>
3537
<item> priv </item>
3638
<item> pub </item>
39+
<item> pure </item>
3740
<item> ref </item>
3841
<item> return </item>
3942
<item> static </item>
4043
<item> struct </item>
41-
<item> super </item>
4244
<item> trait </item>
4345
<item> unsafe </item>
4446
<item> use </item>

branches/try2/src/libcore/container.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,9 @@ pub trait Map<K, V>: Mutable {
3838
/// Iterate over the map and mutate the contained values
3939
fn mutate_values(&mut self, f: &fn(&K, &mut V) -> bool);
4040

41-
/// Return a reference to the value corresponding to the key
41+
/// Return the value corresponding to the key in the map
4242
fn find(&self, key: &K) -> Option<&'self V>;
4343

44-
/// Return a mutable reference to the value corresponding to the key
45-
fn find_mut(&mut self, key: &K) -> Option<&'self mut V>;
46-
4744
/// Insert a key-value pair into the map. An existing value for a
4845
/// key is replaced by the new value. Return true if the key did
4946
/// not already exist in the map.

branches/try2/src/libcore/core.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Implicitly, all crates behave as if they included the following prologue:
5151
#[warn(vecs_implicitly_copyable)];
5252
#[deny(non_camel_case_types)];
5353
#[allow(deprecated_mutable_fields)];
54+
#[deny(deprecated_self)];
5455
#[allow(deprecated_drop)];
5556

5657
// On Linux, link to the runtime with -lrt.
@@ -230,7 +231,6 @@ pub mod rt;
230231
// can be resolved within libcore.
231232
#[doc(hidden)]
232233
pub mod core {
233-
pub use clone;
234234
pub use cmp;
235235
pub use condition;
236236
pub use option;

branches/try2/src/libcore/either.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use result;
1717
use vec;
1818

1919
/// The either type
20-
#[deriving(Clone, Eq)]
20+
#[deriving(Eq)]
2121
pub enum Either<T, U> {
2222
Left(T),
2323
Right(U)

0 commit comments

Comments
 (0)