Skip to content

Commit fe87f1e

Browse files
committed
---
yaml --- r: 138641 b: refs/heads/try2 c: dcd2f73 h: refs/heads/master i: 138639: 3276834 v: v3
1 parent 4633c22 commit fe87f1e

36 files changed

+171
-187
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: 2f901126d4c2c19334842e539561b15e7e74159d
8+
refs/heads/try2: dcd2f735606ea952425760edce2ac55a32850341
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ You're not off the hook even if you just stick to documentation; code examples i
1111
Pull requests will be treated as "review requests",
1212
and we will give feedback we expect to see corrected on [style](https://github.com/mozilla/rust/wiki/Note-style-guide) and substance before pulling.
1313
Changes contributed via pull request should focus on a single issue at a time, like any other.
14-
We will not accept pull-requests that try to "sneak" unrelated changes in.
14+
We will not look accept pull-requests that try to "sneak" unrelated changes in.
1515

1616
Normally, all pull requests must include regression tests (see [Note-testsuite](https://github.com/mozilla/rust/wiki/Note-testsuite)) that test your change.
1717
Occasionally, a change will be very difficult to test for.

branches/try2/doc/rust.md

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -908,11 +908,6 @@ function defined above on `[1, 2]` will instantiate type parameter `T`
908908
with `int`, and require the closure parameter to have type
909909
`fn(int)`.
910910

911-
The type parameters can also be explicitly supplied in a trailing
912-
[path](#paths) component after the function name. This might be necessary
913-
if there is not sufficient context to determine the type parameters. For
914-
example, `sys::size_of::<u32>() == 4`.
915-
916911
Since a parameter type is opaque to the generic function, the set of
917912
operations that can be performed on it is limited. Values of parameter
918913
type can always be moved, but they can only be copied when the
@@ -1090,15 +1085,6 @@ let p = Point(10, 11);
10901085
let px: int = match p { Point(x, _) => x };
10911086
~~~~
10921087

1093-
A _unit-like struct_ is a structure without any fields, defined by leaving off the fields list entirely.
1094-
Such types will have a single value, just like the [unit value `()`](#unit-and-boolean-literals) of the unit type.
1095-
For example:
1096-
1097-
~~~~
1098-
struct Cookie;
1099-
let c = [Cookie, Cookie, Cookie, Cookie];
1100-
~~~~
1101-
11021088
### Enumerations
11031089

11041090
An _enumeration_ is a simultaneous definition of a nominal [enumerated type](#enumerated-types) as well as a set of *constructors*,
@@ -1604,8 +1590,7 @@ struct_expr : expr_path '{' ident ':' expr
16041590
[ ',' ident ':' expr ] *
16051591
[ ".." expr ] '}' |
16061592
expr_path '(' expr
1607-
[ ',' expr ] * ')' |
1608-
expr_path
1593+
[ ',' expr ] * ')'
16091594
~~~~~~~~
16101595

16111596
There are several forms of structure expressions.
@@ -1615,28 +1600,23 @@ providing the field values of a new instance of the structure.
16151600
A field name can be any identifier, and is separated from its value expression by a colon.
16161601
To indicate that a field is mutable, the `mut` keyword is written before its name.
16171602

1618-
A _tuple structure expression_ consists of the [path](#paths) of a [structure item](#structures),
1603+
A _tuple structure expression_ constists of the [path](#paths) of a [structure item](#structures),
16191604
followed by a parenthesized list of one or more comma-separated expressions
16201605
(in other words, the path of a structured item followed by a tuple expression).
16211606
The structure item must be a tuple structure item.
16221607

1623-
A _unit-like structure expression_ consists only of the [path](#paths) of a [structure item](#structures).
1624-
16251608
The following are examples of structure expressions:
16261609

16271610
~~~~
16281611
# struct Point { x: float, y: float }
16291612
# struct TuplePoint(float, float);
16301613
# mod game { pub struct User { name: &str, age: uint, score: uint } }
1631-
# struct Cookie; fn some_fn<T>(t: T) {}
16321614
Point {x: 10f, y: 20f};
16331615
TuplePoint(10f, 20f);
16341616
let u = game::User {name: "Joe", age: 35u, score: 100_000};
1635-
some_fn::<Cookie>(Cookie);
16361617
~~~~
16371618

16381619
A structure expression forms a new value of the named structure type.
1639-
Note that for a given *unit-like* structure type, this will always be the same value.
16401620

16411621
A structure expression can terminate with the syntax `..` followed by an expression to denote a functional update.
16421622
The expression following `..` (the base) must be of the same structure type as the new structure type being formed.
@@ -2060,14 +2040,12 @@ an optional reference slot to serve as the function's output, bound to the
20602040
`lval` on the right hand side of the call. If the function eventually returns,
20612041
then the expression completes.
20622042

2063-
Some examples of call expressions:
2043+
An example of a call expression:
20642044

20652045
~~~~
20662046
# fn add(x: int, y: int) -> int { 0 }
2067-
# use core::from_str::FromStr::from_str;
20682047
20692048
let x: int = add(1, 2);
2070-
let pi = from_str::<f32>("3.14");
20712049
~~~~
20722050

20732051
### Lambda expressions
@@ -2665,10 +2643,7 @@ the resulting `struct` value will always be laid out in memory in the order spec
26652643
The fields of a `struct` may be qualified by [visibility modifiers](#visibility-modifiers),
26662644
to restrict access to implementation-private data in a structure.
26672645

2668-
A _tuple struct_ type is just like a structure type, except that the fields are anonymous.
2669-
2670-
A _unit-like struct_ type is like a structure type, except that it has no fields.
2671-
The one value constructed by the associated [structure expression](#structure-expression) is the only value that inhabits such a type.
2646+
A `tuple struct` type is just like a structure type, except that the fields are anonymous.
26722647

26732648
### Enumerated types
26742649

branches/try2/src/libcore/at_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ pub mod raw {
183183
use at_vec::{capacity, rustrt};
184184
use cast::transmute;
185185
use libc;
186-
use unstable::intrinsics::{move_val_init};
186+
use private::intrinsics::{move_val_init};
187187
use ptr::addr_of;
188188
use ptr;
189189
use sys;

branches/try2/src/libcore/cleanup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ fn debug_mem() -> bool {
154154
#[cfg(notest)]
155155
#[lang="annihilate"]
156156
pub unsafe fn annihilate() {
157-
use unstable::lang::local_free;
157+
use rt::local_free;
158158
use io::WriterUtil;
159159
use io;
160160
use libc;

branches/try2/src/libcore/comm.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use either::{Either, Left, Right};
1212
use kinds::Owned;
1313
use option;
1414
use option::{Option, Some, None, unwrap};
15-
use unstable;
15+
use private;
1616
use vec;
1717

1818
use pipes::{recv, try_recv, wait_many, peek, PacketHeader};
@@ -242,7 +242,7 @@ impl<T: Owned> Peekable<T> for PortSet<T> {
242242
}
243243
244244
/// A channel that can be shared between many senders.
245-
pub type SharedChan<T> = unstable::Exclusive<Chan<T>>;
245+
pub type SharedChan<T> = private::Exclusive<Chan<T>>;
246246
247247
impl<T: Owned> GenericChan<T> for SharedChan<T> {
248248
fn send(x: T) {
@@ -268,7 +268,7 @@ impl<T: Owned> GenericSmartChan<T> for SharedChan<T> {
268268
269269
/// Converts a `chan` into a `shared_chan`.
270270
pub fn SharedChan<T:Owned>(c: Chan<T>) -> SharedChan<T> {
271-
unstable::exclusive(c)
271+
private::exclusive(c)
272272
}
273273
274274
/// Receive a message from one of two endpoints.

branches/try2/src/libcore/core.rc

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,11 @@ pub const debug : u32 = 4_u32;
225225

226226
/* Unsupported interfaces */
227227

228+
// The runtime interface used by the compiler
229+
#[cfg(notest)] pub mod rt;
228230
// Private APIs
229-
pub mod unstable;
230-
// NOTE: Remove after snapshot
231-
#[cfg(stage0)]
232-
pub mod private {
233-
pub use super::unstable::extfmt;
234-
}
231+
pub mod private;
232+
235233

236234
/* For internal use, not exported */
237235

branches/try2/src/libcore/num/f32.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use num::strconv;
1818
use num;
1919
use ops;
2020
use option::Option;
21-
use unstable::intrinsics::floorf32;
21+
use private::intrinsics::floorf32;
2222
use from_str;
2323
use to_str;
2424

branches/try2/src/libcore/num/f64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use num::strconv;
1919
use num;
2020
use ops;
2121
use option::Option;
22-
use unstable::intrinsics::floorf64;
22+
use private::intrinsics::floorf64;
2323
use to_str;
2424
use from_str;
2525

branches/try2/src/libcore/os.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ use libc::{mode_t, pid_t, FILE};
3535
use option;
3636
use option::{Some, None};
3737
use prelude::*;
38+
use private;
3839
use ptr;
3940
use str;
4041
use task;
@@ -144,8 +145,8 @@ This uses a per-runtime lock to serialize access.
144145
FIXME #4726: It would probably be appropriate to make this a real global
145146
*/
146147
fn with_env_lock<T>(f: &fn() -> T) -> T {
147-
use unstable::global::global_data_clone_create;
148-
use unstable::{Exclusive, exclusive};
148+
use private::global::global_data_clone_create;
149+
use private::{Exclusive, exclusive};
149150

150151
struct SharedValue(());
151152
type ValueMutex = Exclusive<SharedValue>;

branches/try2/src/libcore/pipes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ use libc;
9191
use option;
9292
use option::{None, Option, Some, unwrap};
9393
use pipes;
94-
use unstable::intrinsics;
94+
use private::intrinsics;
9595
use ptr;
96-
use unstable;
96+
use private;
9797
use task;
9898
use vec;
9999

branches/try2/src/libcore/prelude.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pub use option;
6969
pub use os;
7070
pub use path;
7171
pub use comm;
72-
pub use unstable;
72+
pub use private;
7373
pub use ptr;
7474
pub use rand;
7575
pub use result;

branches/try2/src/libcore/unstable.rs renamed to branches/try2/src/libcore/private.rs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,20 @@ use task;
2222
use task::{TaskBuilder, atomically};
2323
use uint;
2424

25-
#[path = "unstable/at_exit.rs"]
25+
#[path = "private/at_exit.rs"]
2626
pub mod at_exit;
27-
#[path = "unstable/global.rs"]
27+
#[path = "private/global.rs"]
2828
pub mod global;
29-
#[path = "unstable/finally.rs"]
29+
#[path = "private/finally.rs"]
3030
pub mod finally;
31-
#[path = "unstable/weak_task.rs"]
31+
#[path = "private/weak_task.rs"]
3232
pub mod weak_task;
33-
#[path = "unstable/exchange_alloc.rs"]
33+
#[path = "private/exchange_alloc.rs"]
3434
pub mod exchange_alloc;
35-
#[path = "unstable/intrinsics.rs"]
35+
#[path = "private/intrinsics.rs"]
3636
pub mod intrinsics;
37-
#[path = "unstable/extfmt.rs"]
37+
#[path = "private/extfmt.rs"]
3838
pub mod extfmt;
39-
#[path = "unstable/lang.rs"]
40-
#[cfg(notest)]
41-
pub mod lang;
4239

4340
extern mod rustrt {
4441
pub unsafe fn rust_create_little_lock() -> rust_little_lock;
@@ -315,7 +312,7 @@ pub mod tests {
315312
use cell::Cell;
316313
use comm;
317314
use option;
318-
use super::exclusive;
315+
use private::exclusive;
319316
use result;
320317
use task;
321318
use uint;

branches/try2/src/libcore/unstable/exchange_alloc.rs renamed to branches/try2/src/libcore/private/exchange_alloc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use c_malloc = libc::malloc;
1414
use c_free = libc::free;
1515
use managed::raw::{BoxHeaderRepr, BoxRepr};
1616
use cast::transmute;
17-
use unstable::intrinsics::{atomic_xadd,atomic_xsub};
17+
use private::intrinsics::{atomic_xadd,atomic_xsub};
1818
use ptr::null;
1919
use intrinsic::TyDesc;
2020

branches/try2/src/libcore/unstable/global.rs renamed to branches/try2/src/libcore/private/global.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ use libc::{c_void, uintptr_t};
3232
use option::{Option, Some, None};
3333
use ops::Drop;
3434
use pipes;
35-
use unstable::{Exclusive, exclusive};
36-
use unstable::{SharedMutableState, shared_mutable_state};
37-
use unstable::{get_shared_immutable_state};
38-
use unstable::at_exit::at_exit;
39-
use unstable::intrinsics::atomic_cxchg;
35+
use private::{Exclusive, exclusive};
36+
use private::{SharedMutableState, shared_mutable_state};
37+
use private::{get_shared_immutable_state};
38+
use private::at_exit::at_exit;
39+
use private::intrinsics::atomic_cxchg;
4040
use hashmap::linear::LinearMap;
4141
use sys::Closure;
4242
use task::spawn;

branches/try2/src/libcore/unstable/weak_task.rs renamed to branches/try2/src/libcore/private/weak_task.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ use comm::{Port, Chan, SharedChan, GenericChan, GenericPort};
2424
use hashmap::linear::LinearMap;
2525
use ops::Drop;
2626
use option::{Some, None, swap_unwrap};
27-
use unstable::at_exit::at_exit;
28-
use unstable::finally::Finally;
29-
use unstable::global::global_data_clone_create;
27+
use private::at_exit::at_exit;
28+
use private::finally::Finally;
29+
use private::global::global_data_clone_create;
3030
use task::rt::{task_id, get_task_id};
3131
use task::{Task, task, spawn};
3232

branches/try2/src/libcore/ptr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use cast;
1414
use cmp::{Eq, Ord};
1515
use libc;
1616
use libc::{c_void, size_t};
17-
use unstable::intrinsics::{memmove32,memmove64};
17+
use private::intrinsics::{memmove32,memmove64};
1818
use ptr;
1919
use str;
2020
use sys;

branches/try2/src/libcore/unstable/lang.rs renamed to branches/try2/src/libcore/rt.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ use libc::{c_char, c_uchar, c_void, size_t, uintptr_t, c_int};
1515
use managed::raw::BoxRepr;
1616
use str;
1717
use sys;
18-
use unstable::exchange_alloc;
18+
use private::exchange_alloc;
1919
use cast::transmute;
2020

2121
use gc::{cleanup_stack_for_failure, gc, Word};
2222

23+
#[allow(non_camel_case_types)]
24+
pub type rust_task = c_void;
25+
2326
#[cfg(target_word_size = "32")]
2427
pub const FROZEN_BIT: uint = 0x80000000;
2528
#[cfg(target_word_size = "64")]

branches/try2/src/libcore/task/local_data_priv.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ use prelude::*;
1919
use task::rt;
2020
use task::local_data::LocalDataKey;
2121

22-
use super::rt::rust_task;
22+
#[cfg(notest)]
23+
use rt::rust_task;
24+
#[cfg(test)]
25+
#[allow(non_camel_case_types)]
26+
type rust_task = libc::c_void;
2327

2428
pub trait LocalData { }
2529
impl<T:Durable> LocalData for @T { }

0 commit comments

Comments
 (0)