Skip to content

Commit a34092b

Browse files
author
Eric Reed
committed
---
yaml --- r: 64127 b: refs/heads/snap-stage3 c: cf23292 h: refs/heads/master i: 64125: d70f5b2 64123: a13962d 64119: 587d0fd 64111: 6a4e41f 64095: 845d771 64063: f485628 63999: 34ec40e v: v3
1 parent 5b0c049 commit a34092b

File tree

291 files changed

+11218
-7165
lines changed

Some content is hidden

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

291 files changed

+11218
-7165
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: f7b293bc75684a368e20567b5987c482dc5f8550
4+
refs/heads/snap-stage3: cf2329201098c6e3b417548651a1c3dbf19c0dc0
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ endif
139139

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

148148
ifneq ($(wildcard $(CFG_GIT)),)
149149
ifneq ($(wildcard $(CFG_GIT_DIR)),)

branches/snap-stage3/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ fi
402402
step_msg "looking for build programs"
403403

404404
probe_need CFG_PERL perl
405-
probe_need CFG_CURLORWGET curl wget
405+
probe_need CFG_CURL curl
406406
probe_need CFG_PYTHON python2.7 python2.6 python2 python
407407

408408
python_version=$($CFG_PYTHON -V 2>&1)

branches/snap-stage3/doc/rust.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ The keywords are the following strings:
207207
as
208208
break
209209
copy
210-
do
210+
do drop
211211
else enum extern
212212
false fn for
213213
if impl
@@ -1107,20 +1107,20 @@ The derived types are borrowed pointers with the `'static` lifetime,
11071107
fixed-size arrays, tuples, and structs.
11081108

11091109
~~~~
1110-
static BIT1: uint = 1 << 0;
1111-
static BIT2: uint = 1 << 1;
1110+
static bit1: uint = 1 << 0;
1111+
static bit2: uint = 1 << 1;
11121112
1113-
static BITS: [uint, ..2] = [BIT1, BIT2];
1114-
static STRING: &'static str = "bitstring";
1113+
static bits: [uint, ..2] = [bit1, bit2];
1114+
static string: &'static str = "bitstring";
11151115
11161116
struct BitsNStrings<'self> {
11171117
mybits: [uint, ..2],
11181118
mystring: &'self str
11191119
}
11201120
11211121
static bits_n_strings: BitsNStrings<'static> = BitsNStrings {
1122-
mybits: BITS,
1123-
mystring: STRING
1122+
mybits: bits,
1123+
mystring: string
11241124
};
11251125
~~~~
11261126

@@ -2869,19 +2869,24 @@ The kinds are:
28692869
: Types of this kind can be safely sent between tasks.
28702870
This kind includes scalars, owning pointers, owned closures, and
28712871
structural types containing only other owned types. All `Send` types are `Static`.
2872+
`Static`
2873+
: Types of this kind do not contain any borrowed pointers;
2874+
this can be a useful guarantee for code that breaks borrowing assumptions using [`unsafe` operations](#unsafe-functions).
28722875
`Copy`
28732876
: This kind includes all types that can be copied. All types with
28742877
sendable kind are copyable, as are managed boxes, managed closures,
28752878
trait types, and structural types built out of these.
28762879
Types with destructors (types that implement `Drop`) can not implement `Copy`.
28772880
`Drop`
28782881
: This is not strictly a kind, but its presence interacts with kinds: the `Drop`
2879-
trait provides a single method `drop` that takes no parameters, and is run
2882+
trait provides a single method `finalize` that takes no parameters, and is run
28802883
when values of the type are dropped. Such a method is called a "destructor",
28812884
and are always executed in "top-down" order: a value is completely destroyed
28822885
before any of the values it owns run their destructors. Only `Send` types
28832886
that do not implement `Copy` can implement `Drop`.
28842887

2888+
> **Note:** The `finalize` method may be renamed in future versions of Rust.
2889+
28852890
_Default_
28862891
: Types with destructors, closure environments,
28872892
and various other _non-first-class_ types,

branches/snap-stage3/doc/tutorial-container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl Iterator<int> for ZeroStream {
108108
## Container iterators
109109
110110
Containers implement iteration over the contained elements by returning an
111-
iterator object. For example, vector slices have four iterators available:
111+
iterator object. For example, vectors have four iterators available:
112112
113113
* `vector.iter()`, for immutable references to the elements
114114
* `vector.mut_iter()`, for mutable references to the elements

branches/snap-stage3/doc/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ can specify a variable's type by following it with a colon, then the type
237237
name. Static items, on the other hand, always require a type annotation.
238238

239239
~~~~
240-
static MONSTER_FACTOR: float = 57.8;
241-
let monster_size = MONSTER_FACTOR * 10.0;
240+
static monster_factor: float = 57.8;
241+
let monster_size = monster_factor * 10.0;
242242
let monster_size: int = 50;
243243
~~~~
244244

branches/snap-stage3/mk/platform.mk

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,9 @@ AR_i686-pc-mingw32=$(AR)
323323
CFG_LIB_NAME_i686-pc-mingw32=$(1).dll
324324
CFG_LIB_GLOB_i686-pc-mingw32=$(1)-*.dll
325325
CFG_LIB_DSYM_GLOB_i686-pc-mingw32=$(1)-*.dylib.dSYM
326-
CFG_GCCISH_CFLAGS_i686-pc-mingw32 := -Wall -Werror -g -m32 -march=i686 -D_WIN32_WINNT=0x0600
326+
CFG_GCCISH_CFLAGS_i686-pc-mingw32 := -Wall -Werror -g -march=i686
327327
CFG_GCCISH_CXXFLAGS_i686-pc-mingw32 := -fno-rtti
328-
CFG_GCCISH_LINK_FLAGS_i686-pc-mingw32 := -shared -fPIC -g -m32
328+
CFG_GCCISH_LINK_FLAGS_i686-pc-mingw32 := -shared -fPIC -g
329329
CFG_GCCISH_DEF_FLAG_i686-pc-mingw32 :=
330330
CFG_GCCISH_PRE_LIB_FLAGS_i686-pc-mingw32 :=
331331
CFG_GCCISH_POST_LIB_FLAGS_i686-pc-mingw32 :=
@@ -367,31 +367,6 @@ CFG_LDPATH_i586-mingw32msvc :=
367367
CFG_RUN_i586-mingw32msvc=
368368
CFG_RUN_TARG_i586-mingw32msvc=
369369

370-
# x86_64-w64-mingw32 configuration
371-
CC_x86_64-w64-mingw32=$(CC)
372-
CXX_x86_64-w64-mingw32=$(CXX)
373-
CPP_x86_64-w64-mingw32=$(CPP)
374-
AR_x86_64-w64-mingw32=$(AR)
375-
CFG_LIB_NAME_x86_64-w64-mingw32=$(1).dll
376-
CFG_LIB_GLOB_x86_64-w64-mingw32=$(1)-*.dll
377-
CFG_LIB_DSYM_GLOB_x86_64-w64-mingw32=$(1)-*.dylib.dSYM
378-
CFG_GCCISH_CFLAGS_x86_64-w64-mingw32 := -Wall -Werror -g -m64 -D_WIN32_WINNT=0x0600
379-
CFG_GCCISH_CXXFLAGS_x86_64-w64-mingw32 := -fno-rtti
380-
CFG_GCCISH_LINK_FLAGS_x86_64-w64-mingw32 := -shared -fPIC -g -m64
381-
CFG_GCCISH_DEF_FLAG_x86_64-w64-mingw32 :=
382-
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-w64-mingw32 :=
383-
CFG_GCCISH_POST_LIB_FLAGS_x86_64-w64-mingw32 :=
384-
CFG_DEF_SUFFIX_x86_64-w64-mingw32 := .mingw32.def
385-
CFG_INSTALL_NAME_x86_64-w64-mingw32 =
386-
CFG_LIBUV_LINK_FLAGS_x86_64-w64-mingw32 := -lWs2_32 -lpsapi -liphlpapi
387-
CFG_EXE_SUFFIX_x86_64-w64-mingw32 := .exe
388-
CFG_WINDOWSY_x86_64-w64-mingw32 := 1
389-
CFG_UNIXY_x86_64-w64-mingw32 :=
390-
CFG_PATH_MUNGE_x86_64-w64-mingw32 :=
391-
CFG_LDPATH_x86_64-w64-mingw32 :=$(CFG_LDPATH_x86_64-w64-mingw32):$(PATH)
392-
CFG_RUN_x86_64-w64-mingw32=PATH="$(CFG_LDPATH_x86_64-w64-mingw32):$(1)" $(2)
393-
CFG_RUN_TARG_x86_64-w64-mingw32=$(call CFG_RUN_x86_64-w64-mingw32,$(HLIB$(1)_H_$(CFG_BUILD_TRIPLE)),$(2))
394-
395370
# x86_64-unknown-freebsd configuration
396371
CC_x86_64-unknown-freebsd=$(CC)
397372
CXX_x86_64-unknown-freebsd=$(CXX)

branches/snap-stage3/mk/tests.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
# The names of crates that must be tested
1717
TEST_TARGET_CRATES = std extra
18-
TEST_HOST_CRATES = syntax rustc rustdoc rust rustpkg rusti
18+
TEST_HOST_CRATES = syntax rustc rustdoc rusti rust rustpkg
1919
TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
2020

2121
# Markdown files under doc/ that should have their code extracted and run
@@ -157,7 +157,6 @@ check-test: cleantestlibs cleantmptestlogs all check-stage2-rfail
157157

158158
check-lite: cleantestlibs cleantmptestlogs \
159159
check-stage2-std check-stage2-extra check-stage2-rpass \
160-
check-stage2-rustpkg check-stage2-rusti \
161160
check-stage2-rfail check-stage2-cfail
162161
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
163162

branches/snap-stage3/mk/tools.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ $$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTPKG_$(4)): \
5050
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_EXTRALIB_$(4)) \
5151
$$(TLIB$(1)_T_$(4)_H_$(3))/$(CFG_LIBRUSTC_$(4))
5252
@$$(call E, compile_and_link: $$@)
53-
$$(STAGE$(1)_T_$(4)_H_$(3)) $$(WFLAGS_ST$(1)) -o $$@ $$< && touch $$@
53+
$$(STAGE$(1)_T_$(4)_H_$(3)) -o $$@ $$< && touch $$@
5454

5555
$$(TBIN$(1)_T_$(4)_H_$(3))/rustpkg$$(X_$(4)): \
5656
$$(DRIVER_CRATE) \

branches/snap-stage3/src/compiletest/common.rs

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

11+
use core::prelude::*;
12+
1113
#[deriving(Eq)]
1214
pub enum mode {
1315
mode_compile_fail,

branches/snap-stage3/src/compiletest/compiletest.rs

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,21 @@
1111
#[crate_type = "bin"];
1212

1313
#[allow(non_camel_case_types)];
14-
#[allow(unrecognized_lint)]; // NOTE: remove after snapshot
15-
#[deny(warnings)];
1614

17-
extern mod extra;
15+
#[no_core]; // XXX: Remove after snapshot
16+
#[no_std];
1817

19-
use std::os;
18+
extern mod core(name = "std", vers = "0.7");
19+
extern mod extra(name = "extra", vers = "0.7");
20+
21+
use core::prelude::*;
22+
use core::*;
2023

2124
use extra::getopts;
2225
use extra::test;
2326

27+
use core::result::{Ok, Err};
28+
2429
use common::config;
2530
use common::mode_run_pass;
2631
use common::mode_run_fail;
@@ -37,6 +42,13 @@ pub mod runtest;
3742
pub mod common;
3843
pub mod errors;
3944

45+
mod std {
46+
pub use core::cmp;
47+
pub use core::str;
48+
pub use core::sys;
49+
pub use core::unstable;
50+
}
51+
4052
pub fn main() {
4153
let args = os::args();
4254
let config = parse_config(args);
@@ -86,8 +98,8 @@ pub fn parse_config(args: ~[~str]) -> config {
8698
run_ignored: getopts::opt_present(matches, "ignored"),
8799
filter:
88100
if !matches.free.is_empty() {
89-
Some(copy matches.free[0])
90-
} else { None },
101+
option::Some(copy matches.free[0])
102+
} else { option::None },
91103
logfile: getopts::opt_maybe_str(matches, "logfile").map(|s| Path(*s)),
92104
runtool: getopts::opt_maybe_str(matches, "runtool"),
93105
rustcflags: getopts::opt_maybe_str(matches, "rustcflags"),
@@ -136,8 +148,8 @@ pub fn log_config(config: &config) {
136148

137149
pub fn opt_str<'a>(maybestr: &'a Option<~str>) -> &'a str {
138150
match *maybestr {
139-
None => "(none)",
140-
Some(ref s) => {
151+
option::None => "(none)",
152+
option::Some(ref s) => {
141153
let s: &'a str = *s;
142154
s
143155
}
@@ -149,7 +161,7 @@ pub fn opt_str2(maybestr: Option<~str>) -> ~str {
149161
}
150162

151163
pub fn str_opt(maybestr: ~str) -> Option<~str> {
152-
if maybestr != ~"(none)" { Some(maybestr) } else { None }
164+
if maybestr != ~"(none)" { option::Some(maybestr) } else { option::None }
153165
}
154166

155167
pub fn str_mode(s: ~str) -> mode {
@@ -187,8 +199,8 @@ pub fn test_opts(config: &config) -> test::TestOpts {
187199
logfile: copy config.logfile,
188200
run_tests: true,
189201
run_benchmarks: false,
190-
save_results: None,
191-
compare_results: None
202+
save_results: option::None,
203+
compare_results: option::None
192204
}
193205
}
194206

@@ -256,7 +268,7 @@ pub fn make_test_name(config: &config, testfile: &Path) -> test::TestName {
256268
}
257269

258270
pub fn make_test_closure(config: &config, testfile: &Path) -> test::TestFn {
259-
use std::cell::Cell;
271+
use core::cell::Cell;
260272
let config = Cell::new(copy *config);
261273
let testfile = Cell::new(testfile.to_str());
262274
test::DynTestFn(|| { runtest::run(config.take(), testfile.take()) })

branches/snap-stage3/src/compiletest/errors.rs

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

11-
use std::io;
11+
use core::prelude::*;
12+
13+
use core::io;
1214

1315
pub struct ExpectedError { line: uint, kind: ~str, msg: ~str }
1416

branches/snap-stage3/src/compiletest/header.rs

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

11+
use core::prelude::*;
12+
1113
use common::config;
1214
use common;
1315

14-
use std::io;
15-
use std::os;
16+
use core::io;
17+
use core::os;
1618

1719
pub struct TestProps {
1820
// Lines that should be expected, in order, on standard out

branches/snap-stage3/src/compiletest/procsrv.rs

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

11-
use std::os;
12-
use std::run;
13-
use std::str;
11+
use core::prelude::*;
12+
13+
use core::os;
14+
use core::run;
15+
use core::str;
1416

1517
#[cfg(target_os = "win32")]
1618
fn target_env(lib_path: &str, prog: &str) -> ~[(~str,~str)] {

branches/snap-stage3/src/compiletest/runtest.rs

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

11+
use core::prelude::*;
12+
1113
use common::mode_run_pass;
1214
use common::mode_run_fail;
1315
use common::mode_compile_fail;
@@ -20,10 +22,10 @@ use procsrv;
2022
use util;
2123
use util::logv;
2224

23-
use std::io;
24-
use std::os;
25-
use std::uint;
26-
use std::vec;
25+
use core::io;
26+
use core::os;
27+
use core::uint;
28+
use core::vec;
2729

2830
pub fn run(config: config, testfile: ~str) {
2931
if config.verbose {
@@ -77,8 +79,8 @@ fn run_rfail_test(config: &config, props: &TestProps, testfile: &Path) {
7779
};
7880
7981
// The value our Makefile configures valgrind to return on failure
80-
static VALGRIND_ERR: int = 100;
81-
if ProcRes.status == VALGRIND_ERR {
82+
static valgrind_err: int = 100;
83+
if ProcRes.status == valgrind_err {
8284
fatal_ProcRes(~"run-fail test isn't valgrind-clean!", &ProcRes);
8385
}
8486
@@ -100,8 +102,8 @@ fn run_rfail_test(config: &config, props: &TestProps, testfile: &Path) {
100102

101103
fn check_correct_failure_status(ProcRes: &ProcRes) {
102104
// The value the rust runtime returns on failure
103-
static RUST_ERR: int = 101;
104-
if ProcRes.status != RUST_ERR {
105+
static rust_err: int = 101;
106+
if ProcRes.status != rust_err {
105107
fatal_ProcRes(
106108
fmt!("failure produced the wrong error code: %d",
107109
ProcRes.status),
@@ -599,8 +601,9 @@ fn make_run_args(config: &config, _props: &TestProps, testfile: &Path) ->
599601
ProcArgs {
600602
// If we've got another tool to run under (valgrind),
601603
// then split apart its command
602-
let mut args = split_maybe_args(&config.runtool);
603-
args.push(make_exe_name(config, testfile).to_str());
604+
let toolargs = split_maybe_args(&config.runtool);
605+
606+
let mut args = toolargs + [make_exe_name(config, testfile).to_str()];
604607
let prog = args.shift();
605608
return ProcArgs {prog: prog, args: args};
606609
}

branches/snap-stage3/src/compiletest/util.rs

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

11+
use core::prelude::*;
12+
1113
use common::config;
1214

13-
use std::io;
14-
use std::os::getenv;
15+
use core::io;
16+
use core::os::getenv;
1517

1618
pub fn make_new_path(path: &str) -> ~str {
1719

0 commit comments

Comments
 (0)