Skip to content

Commit 83c7c38

Browse files
committed
---
yaml --- r: 141212 b: refs/heads/try2 c: b5ab101 h: refs/heads/master v: v3
1 parent 495f5c9 commit 83c7c38

File tree

692 files changed

+8813
-6509
lines changed

Some content is hidden

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

692 files changed

+8813
-6509
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: 5a424813667a27a0def860d96a5e79801718592b
8+
refs/heads/try2: b5ab1012f1f5786f550e511ba1302a22c85fcd71
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/Makefile.in

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ endif
122122
ifdef TRACE
123123
CFG_RUSTC_FLAGS += -Z trace
124124
endif
125+
ifndef DEBUG_BORROWS
126+
RUSTFLAGS_STAGE1 += -Z no-debug-borrows
127+
RUSTFLAGS_STAGE2 += -Z no-debug-borrows
128+
endif
125129

126130
# platform-specific auto-configuration
127131
include $(CFG_SRC_DIR)mk/platform.mk
@@ -201,8 +205,8 @@ define DEF_LIBS
201205

202206
CFG_RUNTIME_$(1) :=$(call CFG_LIB_NAME_$(1),rustrt)
203207
CFG_RUSTLLVM_$(1) :=$(call CFG_LIB_NAME_$(1),rustllvm)
204-
CFG_CORELIB_$(1) :=$(call CFG_LIB_NAME_$(1),core)
205208
CFG_STDLIB_$(1) :=$(call CFG_LIB_NAME_$(1),std)
209+
CFG_EXTRALIB_$(1) :=$(call CFG_LIB_NAME_$(1),extra)
206210
CFG_LIBRUSTC_$(1) :=$(call CFG_LIB_NAME_$(1),rustc)
207211
CFG_LIBSYNTAX_$(1) :=$(call CFG_LIB_NAME_$(1),syntax)
208212
CFG_LIBFUZZER_$(1) :=$(call CFG_LIB_NAME_$(1),fuzzer)
@@ -211,17 +215,17 @@ CFG_LIBRUSTDOC_$(1) :=$(call CFG_LIB_NAME_$(1),rustdoc)
211215
CFG_LIBRUSTI_$(1) :=$(call CFG_LIB_NAME_$(1),rusti)
212216
CFG_LIBRUST_$(1) :=$(call CFG_LIB_NAME_$(1),rust)
213217

218+
EXTRALIB_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),extra)
214219
STDLIB_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),std)
215-
CORELIB_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),core)
216220
LIBRUSTC_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustc)
217221
LIBSYNTAX_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),syntax)
218222
LIBFUZZER_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),fuzzer)
219223
LIBRUSTPKG_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustpkg)
220224
LIBRUSTDOC_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rustdoc)
221225
LIBRUSTI_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rusti)
222226
LIBRUST_GLOB_$(1) :=$(call CFG_LIB_GLOB_$(1),rust)
227+
EXTRALIB_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),extra)
223228
STDLIB_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),std)
224-
CORELIB_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),core)
225229
LIBRUSTC_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),rustc)
226230
LIBSYNTAX_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),syntax)
227231
LIBFUZZER_DSYM_GLOB_$(1) :=$(call CFG_LIB_DSYM_GLOB_$(1),fuzzer)
@@ -236,19 +240,19 @@ $(foreach target,$(CFG_TARGET_TRIPLES),\
236240
$(eval $(call DEF_LIBS,$(target))))
237241

238242
######################################################################
239-
# Core library variables
243+
# Standard library variables
240244
######################################################################
241245

242-
CORELIB_CRATE := $(S)src/libcore/core.rc
243-
CORELIB_INPUTS := $(wildcard $(addprefix $(S)src/libcore/, \
246+
STDLIB_CRATE := $(S)src/libstd/core.rc
247+
STDLIB_INPUTS := $(wildcard $(addprefix $(S)src/libstd/, \
244248
core.rc *.rs */*.rs */*/*rs */*/*/*rs))
245249

246250
######################################################################
247-
# Standard library variables
251+
# Extra library variables
248252
######################################################################
249253

250-
STDLIB_CRATE := $(S)src/libstd/std.rc
251-
STDLIB_INPUTS := $(wildcard $(addprefix $(S)src/libstd/, \
254+
EXTRALIB_CRATE := $(S)src/libextra/std.rc
255+
EXTRALIB_INPUTS := $(wildcard $(addprefix $(S)src/libextra/, \
252256
std.rc *.rs */*.rs))
253257

254258
######################################################################
@@ -340,33 +344,33 @@ TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustc/$(2)
340344
TBIN$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/bin
341345
TLIB$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/$$(CFG_LIBDIR)
342346

343-
# The name of the core and standard libraries used by rustc
347+
# The name of the standard and extra libraries used by rustc
344348
ifdef CFG_DISABLE_SHAREDSTD
345-
HCORELIB_DEFAULT$(1)_H_$(3) = \
346-
$$(HLIB$(1)_H_$(3))/libcore.rlib
347-
TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
348-
$$(TLIB$(1)_T_$(2)_H_$(3))/libcore.rlib
349-
350349
HSTDLIB_DEFAULT$(1)_H_$(3) = \
351350
$$(HLIB$(1)_H_$(3))/libstd.rlib
352351
TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
353352
$$(TLIB$(1)_T_$(2)_H_$(3))/libstd.rlib
354353

354+
HEXTRALIB_DEFAULT$(1)_H_$(3) = \
355+
$$(HLIB$(1)_H_$(3))/libextra.rlib
356+
TEXTRALIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
357+
$$(TLIB$(1)_T_$(2)_H_$(3))/libextra.rlib
358+
355359
HLIBRUSTC_DEFAULT$(1)_H_$(3) = \
356360
$$(HLIB$(1)_H_$(3))/librustc.rlib
357361
TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3) = \
358362
$$(TLIB$(1)_T_$(2)_H_$(3))/librustc.rlib
359363
else
360-
HCORELIB_DEFAULT$(1)_H_$(3) = \
361-
$$(HLIB$(1)_H_$(3))/$(CFG_CORELIB_$(3))
362-
TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
363-
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(2))
364-
365364
HSTDLIB_DEFAULT$(1)_H_$(3) = \
366365
$$(HLIB$(1)_H_$(3))/$(CFG_STDLIB_$(3))
367366
TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
368367
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2))
369368

369+
HEXTRALIB_DEFAULT$(1)_H_$(3) = \
370+
$$(HLIB$(1)_H_$(3))/$(CFG_EXTRALIB_$(3))
371+
TEXTRALIB_DEFAULT$(1)_T_$(2)_H_$(3) = \
372+
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2))
373+
370374
HLIBRUSTC_DEFAULT$(1)_H_$(3) = \
371375
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTC_$(3))
372376
TLIBRUSTC_DEFAULT$(1)_T_$(2)_H_$(3) = \
@@ -378,8 +382,8 @@ HSREQ$(1)_H_$(3) = \
378382
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
379383
$$(HLIB$(1)_H_$(3))/$(CFG_RUNTIME_$(3)) \
380384
$$(HLIB$(1)_H_$(3))/$(CFG_RUSTLLVM_$(3)) \
381-
$$(HCORELIB_DEFAULT$(1)_H_$(3)) \
382385
$$(HSTDLIB_DEFAULT$(1)_H_$(3)) \
386+
$$(HEXTRALIB_DEFAULT$(1)_H_$(3)) \
383387
$$(HLIBSYNTAX_DEFAULT$(1)_H_$(3)) \
384388
$$(HLIBRUSTC_DEFAULT$(1)_H_$(3)) \
385389
$$(MKFILE_DEPS)
@@ -393,8 +397,8 @@ TSREQ$(1)_T_$(2)_H_$(3) = \
393397
# Prerequisites for a working stageN compiler and libraries, for a specific target
394398
SREQ$(1)_T_$(2)_H_$(3) = \
395399
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
396-
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(2)) \
397-
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2))
400+
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) \
401+
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2))
398402

399403
# Prerequisites for a working stageN compiler and libraries, for a specific target
400404
CSREQ$(1)_T_$(2)_H_$(3) = \
@@ -409,8 +413,8 @@ CSREQ$(1)_T_$(2)_H_$(3) = \
409413
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTDOC_$(3)) \
410414
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUSTI_$(3)) \
411415
$$(HLIB$(1)_H_$(3))/$(CFG_LIBRUST_$(3)) \
412-
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_CORELIB_$(2)) \
413-
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) \
416+
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2)) \
417+
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2)) \
414418
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(2)) \
415419
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(2)) \
416420
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBFUZZER_$(2)) \

branches/try2/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ fi
643643
step_msg "making directories"
644644

645645
for i in \
646-
doc doc/core doc/std \
646+
doc doc/std doc/extra \
647647
dl tmp
648648
do
649649
make_dir $i

branches/try2/doc/rust.md

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ This document does not serve as a tutorial introduction to the
1717
language. Background familiarity with the language is assumed. A separate
1818
[tutorial] document is available to help acquire such background familiarity.
1919

20-
This document also does not serve as a reference to the [core] or [standard]
20+
This document also does not serve as a reference to the [standard] or [extra]
2121
libraries included in the language distribution. Those libraries are
2222
documented separately by extracting documentation attributes from their
2323
source code.
2424

2525
[tutorial]: tutorial.html
26-
[core]: core/index.html
2726
[standard]: std/index.html
27+
[extra]: extra/index.html
2828

2929
## Disclaimer
3030

@@ -441,7 +441,7 @@ expression context, the final namespace qualifier is omitted.
441441
Two examples of paths with type arguments:
442442

443443
~~~~
444-
# use core::hashmap::HashMap;
444+
# use std::hashmap::HashMap;
445445
# fn f() {
446446
# fn id<T:Copy>(t: T) -> T { t }
447447
type t = HashMap<int,~str>; // Type arguments used in a type expression
@@ -768,9 +768,9 @@ Three examples of `extern mod` declarations:
768768
~~~~~~~~{.xfail-test}
769769
extern mod pcre (uuid = "54aba0f8-a7b1-4beb-92f1-4cf625264841");
770770
771-
extern mod std; // equivalent to: extern mod std ( name = "std" );
771+
extern mod extra; // equivalent to: extern mod extra ( name = "extra" );
772772
773-
extern mod ruststd (name = "std"); // linking to 'std' under another name
773+
extern mod rustextra (name = "extra"); // linking to 'extra' under another name
774774
~~~~~~~~
775775

776776
##### Use declarations
@@ -802,19 +802,19 @@ Use declarations support a number of convenient shortcuts:
802802
An example of `use` declarations:
803803

804804
~~~~
805-
use core::float::sin;
806-
use core::str::{slice, contains};
807-
use core::option::Some;
805+
use std::float::sin;
806+
use std::str::{slice, contains};
807+
use std::option::Some;
808808
809809
fn main() {
810-
// Equivalent to 'info!(core::float::sin(1.0));'
810+
// Equivalent to 'info!(std::float::sin(1.0));'
811811
info!(sin(1.0));
812812
813-
// Equivalent to 'info!(core::option::Some(1.0));'
813+
// Equivalent to 'info!(std::option::Some(1.0));'
814814
info!(Some(1.0));
815815
816816
// Equivalent to
817-
// 'info!(core::str::contains(core::str::slice("foo", 0, 1), "oo"));'
817+
// 'info!(std::str::contains(std::str::slice("foo", 0, 1), "oo"));'
818818
info!(contains(slice("foo", 0, 1), "oo"));
819819
}
820820
~~~~
@@ -1327,7 +1327,7 @@ with the exception that they may not have a body
13271327
and are instead terminated by a semicolon.
13281328

13291329
~~~
1330-
# use core::libc::{c_char, FILE};
1330+
# use std::libc::{c_char, FILE};
13311331
# #[nolink]
13321332
13331333
extern {
@@ -1426,6 +1426,7 @@ names are effectively reserved. Some significant attributes include:
14261426
by the compiler can be found via `rustc -W help`.
14271427
* The `deriving` attribute, for automatically generating
14281428
implementations of certain traits.
1429+
* The `static_assert` attribute, for asserting that a static bool is true at compiletime
14291430

14301431
Other attributes may be added or removed during development of the language.
14311432

@@ -1435,7 +1436,7 @@ Some primitive Rust operations are defined in Rust code,
14351436
rather than being implemented directly in C or assembly language.
14361437
The definitions of these operations have to be easy for the compiler to find.
14371438
The `lang` attribute makes it possible to declare these operations.
1438-
For example, the `str` module in the Rust core library defines the string equality function:
1439+
For example, the `str` module in the Rust standard library defines the string equality function:
14391440

14401441
~~~ {.xfail-test}
14411442
#[lang="str_eq"]
@@ -1561,7 +1562,7 @@ impl<T: Eq> Eq for Foo<T> {
15611562
Supported traits for `deriving` are:
15621563

15631564
* Comparison traits: `Eq`, `TotalEq`, `Ord`, `TotalOrd`.
1564-
* Serialization: `Encodable`, `Decodable`. These require `std`.
1565+
* Serialization: `Encodable`, `Decodable`. These require `extra`.
15651566
* `Clone` and `DeepClone`, to perform (deep) copies.
15661567
* `IterBytes`, to iterate over the bytes in a data type.
15671568
* `Rand`, to create a random instance of a data type.
@@ -1884,25 +1885,25 @@ Binary operators expressions are given in terms of
18841885
#### Arithmetic operators
18851886

18861887
Binary arithmetic expressions are syntactic sugar for calls to built-in traits,
1887-
defined in the `core::ops` module of the `core` library.
1888+
defined in the `std::ops` module of the `std` library.
18881889
This means that arithmetic operators can be overridden for user-defined types.
18891890
The default meaning of the operators on standard types is given here.
18901891

18911892
`+`
18921893
: Addition and vector/string concatenation.
1893-
Calls the `add` method on the `core::ops::Add` trait.
1894+
Calls the `add` method on the `std::ops::Add` trait.
18941895
`-`
18951896
: Subtraction.
1896-
Calls the `sub` method on the `core::ops::Sub` trait.
1897+
Calls the `sub` method on the `std::ops::Sub` trait.
18971898
`*`
18981899
: Multiplication.
1899-
Calls the `mul` method on the `core::ops::Mul` trait.
1900+
Calls the `mul` method on the `std::ops::Mul` trait.
19001901
`/`
19011902
: Quotient.
1902-
Calls the `div` method on the `core::ops::Div` trait.
1903+
Calls the `div` method on the `std::ops::Div` trait.
19031904
`%`
19041905
: Remainder.
1905-
Calls the `rem` method on the `core::ops::Rem` trait.
1906+
Calls the `rem` method on the `std::ops::Rem` trait.
19061907

19071908
#### Bitwise operators
19081909

@@ -1913,19 +1914,19 @@ The default meaning of the operators on standard types is given here.
19131914

19141915
`&`
19151916
: And.
1916-
Calls the `bitand` method of the `core::ops::BitAnd` trait.
1917+
Calls the `bitand` method of the `std::ops::BitAnd` trait.
19171918
`|`
19181919
: Inclusive or.
1919-
Calls the `bitor` method of the `core::ops::BitOr` trait.
1920+
Calls the `bitor` method of the `std::ops::BitOr` trait.
19201921
`^`
19211922
: Exclusive or.
1922-
Calls the `bitxor` method of the `core::ops::BitXor` trait.
1923+
Calls the `bitxor` method of the `std::ops::BitXor` trait.
19231924
`<<`
19241925
: Logical left shift.
1925-
Calls the `shl` method of the `core::ops::Shl` trait.
1926+
Calls the `shl` method of the `std::ops::Shl` trait.
19261927
`>>`
19271928
: Logical right shift.
1928-
Calls the `shr` method of the `core::ops::Shr` trait.
1929+
Calls the `shr` method of the `std::ops::Shr` trait.
19291930

19301931
#### Lazy boolean operators
19311932

@@ -1946,22 +1947,22 @@ The default meaning of the operators on standard types is given here.
19461947

19471948
`==`
19481949
: Equal to.
1949-
Calls the `eq` method on the `core::cmp::Eq` trait.
1950+
Calls the `eq` method on the `std::cmp::Eq` trait.
19501951
`!=`
19511952
: Unequal to.
1952-
Calls the `ne` method on the `core::cmp::Eq` trait.
1953+
Calls the `ne` method on the `std::cmp::Eq` trait.
19531954
`<`
19541955
: Less than.
1955-
Calls the `lt` method on the `core::cmp::Ord` trait.
1956+
Calls the `lt` method on the `std::cmp::Ord` trait.
19561957
`>`
19571958
: Greater than.
1958-
Calls the `gt` method on the `core::cmp::Ord` trait.
1959+
Calls the `gt` method on the `std::cmp::Ord` trait.
19591960
`<=`
19601961
: Less than or equal.
1961-
Calls the `le` method on the `core::cmp::Ord` trait.
1962+
Calls the `le` method on the `std::cmp::Ord` trait.
19621963
`>=`
19631964
: Greater than or equal.
1964-
Calls the `ge` method on the `core::cmp::Ord` trait.
1965+
Calls the `ge` method on the `std::cmp::Ord` trait.
19651966

19661967

19671968
#### Type cast expressions
@@ -2120,11 +2121,11 @@ then the expression completes.
21202121
Some examples of call expressions:
21212122

21222123
~~~~
2123-
# use core::from_str::FromStr::from_str;
2124+
# use std::from_str::FromStr;
21242125
# fn add(x: int, y: int) -> int { 0 }
21252126
21262127
let x: int = add(1, 2);
2127-
let pi = from_str::<f32>("3.14");
2128+
let pi = FromStr::from_str::<f32>("3.14");
21282129
~~~~
21292130

21302131
### Lambda expressions
@@ -2434,10 +2435,11 @@ match x {
24342435
}
24352436
~~~~
24362437

2437-
Patterns that bind variables default to binding to a copy of the matched value. This can be made
2438-
explicit using the ```copy``` keyword, changed to bind to a borrowed pointer by using the ```ref```
2439-
keyword, or to a mutable borrowed pointer using ```ref mut```, or the value can be moved into
2440-
the new binding using ```move```.
2438+
Patterns that bind variables default to binding to a copy or move of the matched value
2439+
(depending on the matched value's type).
2440+
This can be made explicit using the ```copy``` keyword,
2441+
changed to bind to a borrowed pointer by using the ```ref``` keyword,
2442+
or to a mutable borrowed pointer using ```ref mut```.
24412443

24422444
A pattern that's just an identifier,
24432445
like `Nil` in the previous answer,
@@ -3167,7 +3169,7 @@ execute, after which it is *descheduled* at a loop-edge or similar
31673169
preemption point, and another task within is scheduled, pseudo-randomly.
31683170

31693171
An executing task can yield control at any time, by making a library call to
3170-
`core::task::yield`, which deschedules it immediately. Entering any other
3172+
`std::task::yield`, which deschedules it immediately. Entering any other
31713173
non-executing state (blocked, dead) similarly deschedules the task.
31723174

31733175

@@ -3180,7 +3182,7 @@ run-time. It is smaller and simpler than many modern language runtimes. It is
31803182
tightly integrated into the language's execution model of memory, tasks,
31813183
communication and logging.
31823184

3183-
> **Note:** The runtime library will merge with the `core` library in future versions of Rust.
3185+
> **Note:** The runtime library will merge with the `std` library in future versions of Rust.
31843186
31853187
### Memory allocation
31863188

0 commit comments

Comments
 (0)