Skip to content

Commit 674e8c8

Browse files
committed
---
yaml --- r: 166651 b: refs/heads/snap-stage3 c: 4717f07 h: refs/heads/master i: 166649: 94bbb2b 166647: e1d93d0 v: v3
1 parent 6bd2c57 commit 674e8c8

File tree

336 files changed

+7177
-4121
lines changed

Some content is hidden

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

336 files changed

+7177
-4121
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: 18842f89f084c52588fe7cffe07f87bf6e90796a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: b8ffad5964e328340de0c03779577eb14caa16fc
4+
refs/heads/snap-stage3: 4717f07989fe4a5d8e473961b86a613d4bb07f35
55
refs/heads/try: f5d619caf9f32458680fae55526b99582ca682dd
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/mk/cfg/x86_64-unknown-dragonfly.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ CFG_LIB_NAME_x86_64-unknown-dragonfly=lib$(1).so
77
CFG_STATIC_LIB_NAME_x86_64-unknown-dragonfly=lib$(1).a
88
CFG_LIB_GLOB_x86_64-unknown-dragonfly=lib$(1)-*.so
99
CFG_LIB_DSYM_GLOB_x86_64-unknown-dragonfly=$(1)-*.dylib.dSYM
10-
CFG_JEMALLOC_CFLAGS_x86_64-unknown-dragonfly := -I/usr/include -I/usr/local/include $(CFLAGS)
11-
CFG_GCCISH_CFLAGS_x86_64-unknown-dragonfly := -Wall -Werror -g -fPIC -I/usr/include -I/usr/local/include $(CFLAGS)
12-
CFG_GCCISH_LINK_FLAGS_x86_64-unknown-dragonfly := -shared -fPIC -g -pthread -lrt
10+
CFG_JEMALLOC_CFLAGS_x86_64-unknown-dragonfly := -m64 -I/usr/include -I/usr/local/include $(CFLAGS)
11+
CFG_GCCISH_CFLAGS_x86_64-unknown-dragonfly := -Wall -Werror -g -fPIC -m64 -I/usr/include -I/usr/local/include $(CFLAGS)
12+
CFG_GCCISH_LINK_FLAGS_x86_64-unknown-dragonfly := -shared -fPIC -g -pthread -lrt -m64
1313
CFG_GCCISH_DEF_FLAG_x86_64-unknown-dragonfly := -Wl,--export-dynamic,--dynamic-list=
1414
CFG_GCCISH_PRE_LIB_FLAGS_x86_64-unknown-dragonfly := -Wl,-whole-archive
1515
CFG_GCCISH_POST_LIB_FLAGS_x86_64-unknown-dragonfly := -Wl,-no-whole-archive

branches/snap-stage3/mk/crates.mk

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,12 @@ DOC_CRATES := $(filter-out rustc, \
122122
$(filter-out rustc_borrowck, \
123123
$(filter-out rustc_resolve, \
124124
$(filter-out rustc_driver, \
125-
$(filter-out syntax, $(CRATES))))))))
125+
$(filter-out log, \
126+
$(filter-out regex, \
127+
$(filter-out regex_macros, \
128+
$(filter-out getopts, \
129+
$(filter-out time, \
130+
$(filter-out syntax, $(CRATES)))))))))))))
126131
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_resolve \
127132
rustc_typeck rustc_driver syntax
128133

branches/snap-stage3/mk/docs.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@ LIB_DOC_DEP_$(1) = \
236236
$$(RSINPUTS_$(1)) \
237237
$$(RUSTDOC_EXE) \
238238
$$(foreach dep,$$(RUST_DEPS_$(1)), \
239-
$$(TLIB2_T_$(CFG_BUILD)_H_$(CFG_BUILD))/stamp.$$(dep) \
239+
$$(TLIB2_T_$(CFG_BUILD)_H_$(CFG_BUILD))/stamp.$$(dep)) \
240+
$$(foreach dep,$$(filter $$(DOC_CRATES), $$(RUST_DEPS_$(1))), \
240241
doc/$$(dep)/)
241242
else
242243
LIB_DOC_DEP_$(1) = $$(CRATEFILE_$(1)) $$(RSINPUTS_$(1))

branches/snap-stage3/mk/grammar.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ $(BG):
3131
$(Q)mkdir -p $(BG)
3232

3333
$(BG)RustLexer.class: $(BG) $(SG)RustLexer.g4
34-
$(Q)$(CFG_ANTLR4) -o $(B)grammar $(SG)RustLexer.g4
34+
$(Q)$(CFG_ANTLR4) -o $(BG) $(SG)RustLexer.g4
3535
$(Q)$(CFG_JAVAC) -d $(BG) $(BG)RustLexer.java
3636

3737
check-build-lexer-verifier: $(BG)verify

branches/snap-stage3/mk/rt.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ $$(JEMALLOC_LOCAL_$(1)): $$(JEMALLOC_DEPS) $$(MKFILE_DEPS)
180180
AR="$$(AR_$(1))" \
181181
RANLIB="$$(AR_$(1)) s" \
182182
CPPFLAGS="-I $(S)src/rt/" \
183-
EXTRA_CFLAGS="-g1"
183+
EXTRA_CFLAGS="-g1 -ffunction-sections -fdata-sections"
184184
$$(Q)$$(MAKE) -C "$$(JEMALLOC_BUILD_DIR_$(1))" build_lib_static
185185

186186
ifeq ($$(CFG_DISABLE_JEMALLOC),)

branches/snap-stage3/mk/tests.mk

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,6 @@ endif
7474
TEST_LOG_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
7575
TEST_OK_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).ok
7676

77-
# If we're sharding the testsuite between parallel testers,
78-
# pass this argument along to the compiletest and crate test
79-
# invocations.
80-
ifdef TEST_SHARD
81-
CTEST_TESTARGS += --test-shard=$(TEST_SHARD)
82-
CRATE_TEST_EXTRA_ARGS += --test-shard=$(TEST_SHARD)
83-
endif
84-
8577
define DEF_TARGET_COMMANDS
8678

8779
ifdef CFG_UNIXY_$(1)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fn parse_expected(last_nonfollow_error: Option<uint>,
6767
re: &Regex) -> Option<(WhichLine, ExpectedError)> {
6868
re.captures(line).and_then(|caps| {
6969
let adjusts = caps.name("adjusts").unwrap_or("").len();
70-
let kind = caps.name("kind").unwrap_or("").to_ascii_lower();
70+
let kind = caps.name("kind").unwrap_or("").to_ascii_lowercase();
7171
let msg = caps.name("msg").unwrap_or("").trim().to_string();
7272
let follow = caps.name("follow").unwrap_or("").len() > 0;
7373

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

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ use util::logv;
2121
#[cfg(target_os = "windows")]
2222
use util;
2323

24+
#[cfg(target_os = "windows")]
25+
use std::ascii::AsciiExt;
2426
use std::io::File;
2527
use std::io::fs::PathExtensions;
2628
use std::io::fs;
@@ -985,22 +987,9 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
985987
format!("{}:{}:", testfile.display(), ee.line)
986988
}).collect::<Vec<String> >();
987989

988-
#[cfg(target_os = "windows")]
989-
fn to_lower( s : &str ) -> String {
990-
let i = s.chars();
991-
let c : Vec<char> = i.map( |c| {
992-
if c.is_ascii() {
993-
c.to_ascii().to_lowercase().as_char()
994-
} else {
995-
c
996-
}
997-
} ).collect();
998-
String::from_chars(c.as_slice())
999-
}
1000-
1001990
#[cfg(windows)]
1002991
fn prefix_matches( line : &str, prefix : &str ) -> bool {
1003-
to_lower(line).as_slice().starts_with(to_lower(prefix).as_slice())
992+
line.to_ascii_lowercase().starts_with(prefix.to_ascii_lowercase().as_slice())
1004993
}
1005994

1006995
#[cfg(unix)]

branches/snap-stage3/src/doc/guide.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,10 +1604,6 @@ let a = [1i, 2i, 3i]; // a: [int, ..3]
16041604
let mut m = [1i, 2i, 3i]; // mut m: [int, ..3]
16051605
```
16061606

1607-
You can create an array with a given number of elements, all initialized to the
1608-
same value, with `[val, ..N]` syntax. The compiler ensures that arrays are
1609-
always initialized.
1610-
16111607
There's a shorthand for initializing each element of an array to the same
16121608
value. In this example, each element of `a` will be initialized to `0i`:
16131609

@@ -1895,7 +1891,7 @@ authors = ["Your Name <[email protected]>"]
18951891
Cargo gets this information from your environment. If it's not correct, go ahead
18961892
and fix that.
18971893

1898-
Finally, Cargo generated a hello, world for us. Check out `src/main.rs`:
1894+
Finally, Cargo generated a "Hello, world!" for us. Check out `src/main.rs`:
18991895

19001896
```{rust}
19011897
fn main() {

branches/snap-stage3/src/doc/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ fn main() {
483483
for i in range(0u, 3u) {
484484
let number = numbers.clone();
485485
Thread::spawn(move || {
486-
let mut array = number.lock();
486+
let mut array = number.lock().unwrap();
487487
488488
(*array)[i] += 1;
489489

branches/snap-stage3/src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ names, and invoked through a consistent syntax: `name!(...)`. Examples include:
640640
* `stringify!` : pretty-print the Rust expression given as an argument
641641
* `include!` : include the Rust expression in the given file
642642
* `include_str!` : include the contents of the given file as a string
643-
* `include_bin!` : include the contents of the given file as a binary blob
643+
* `include_bytes!` : include the contents of the given file as a binary blob
644644
* `error!`, `warn!`, `info!`, `debug!` : provide diagnostic information.
645645

646646
All of the above extensions are expressions with values.

branches/snap-stage3/src/etc/kate/rust.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@
245245
<context attribute="CharEscape" lineEndContext="#pop" name="CharEscape">
246246
<AnyChar String="nrt\&apos;&quot;" attribute="CharEscape" context="#pop"/>
247247
<RegExpr String="x[0-9a-fA-F]{2}" attribute="CharEscape" context="#pop"/>
248+
<RegExpr String="u\{[0-9a-fA-F]{1,6}\}" attribute="CharEscape" context="#pop"/>
248249
<RegExpr String="u[0-9a-fA-F]{4}" attribute="CharEscape" context="#pop"/>
249250
<RegExpr String="U[0-9a-fA-F]{8}" attribute="CharEscape" context="#pop"/>
250251
<RegExpr String="." attribute="Error" context="#pop"/>
@@ -255,7 +256,7 @@
255256
<Detect2Chars char="*" char1="/" attribute="Comment" context="#pop" endRegion="Comment"/>
256257
</context>
257258
</contexts>
258-
<itemDatas>
259+
<itemDatas>
259260
<itemData name="Normal Text" defStyleNum="dsNormal"/>
260261
<itemData name="Keyword" defStyleNum="dsKeyword" color="#770088" bold="1"/>
261262
<itemData name="Self" defStyleNum="dsKeyword" color="#FF0000" bold="1"/>

branches/snap-stage3/src/etc/rustup.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,18 @@ validate_opt() {
229229
done
230230
}
231231

232+
create_tmp_dir() {
233+
local TMP_DIR=./rustup-tmp-install
234+
235+
rm -Rf "${TMP_DIR}"
236+
need_ok "failed to remove temporary installation directory"
237+
238+
mkdir -p "${TMP_DIR}"
239+
need_ok "failed to create create temporary installation directory"
240+
241+
echo $TMP_DIR
242+
}
243+
232244
probe_need CFG_CURL curl
233245
probe_need CFG_TAR tar
234246
probe_need CFG_FILE file
@@ -401,7 +413,9 @@ then
401413
CFG_INSTALL_FLAGS="${CFG_INSTALL_FLAGS} --prefix=${CFG_PREFIX}"
402414
fi
403415

404-
CFG_TMP_DIR="./rustup-tmp-install"
416+
CFG_TMP_DIR=$(mktemp -d 2>/dev/null \
417+
|| mktemp -d -t 'rustup-tmp-install' 2>/dev/null \
418+
|| create_tmp_dir)
405419

406420
RUST_URL="https://static.rust-lang.org/dist"
407421
RUST_PACKAGE_NAME=rust-nightly
@@ -424,9 +438,6 @@ download_package() {
424438

425439
msg "Downloading ${remote_tarball} to ${local_tarball}"
426440

427-
mkdir -p "${CFG_TMP_DIR}"
428-
need_ok "failed to create create download directory"
429-
430441
"${CFG_CURL}" -f -o "${local_tarball}" "${remote_tarball}"
431442
if [ $? -ne 0 ]
432443
then

branches/snap-stage3/src/etc/snapshot.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def scrub(b):
3737
"macos": ["bin/rustc"],
3838
"winnt": ["bin/rustc.exe"],
3939
"freebsd": ["bin/rustc"],
40+
"dragonfly": ["bin/rustc"],
4041
}
4142

4243
winnt_runtime_deps_32 = ["libgcc_s_dw2-1.dll",
@@ -86,6 +87,8 @@ def get_kernel(triple):
8687
return "macos"
8788
if os_name == "freebsd":
8889
return "freebsd"
90+
if os_name == "dragonfly":
91+
return "dragonfly"
8992
return "linux"
9093

9194
def get_cpu(triple):

branches/snap-stage3/src/grammar/verify.rs

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ fn parse_token_list(file: &str) -> HashMap<String, token::Token> {
6161
"SHL" => token::BinOp(token::Shl),
6262
"LBRACE" => token::OpenDelim(token::Brace),
6363
"RARROW" => token::RArrow,
64-
"LIT_STR" => token::Literal(token::Str_(Name(0))),
64+
"LIT_STR" => token::Literal(token::Str_(Name(0)), None),
6565
"DOTDOT" => token::DotDot,
6666
"MOD_SEP" => token::ModSep,
6767
"DOTDOTDOT" => token::DotDotDot,
@@ -71,7 +71,7 @@ fn parse_token_list(file: &str) -> HashMap<String, token::Token> {
7171
"ANDAND" => token::AndAnd,
7272
"AT" => token::At,
7373
"LBRACKET" => token::OpenDelim(token::Bracket),
74-
"LIT_STR_RAW" => token::Literal(token::StrRaw(Name(0), 0)),
74+
"LIT_STR_RAW" => token::Literal(token::StrRaw(Name(0), 0), None),
7575
"RPAREN" => token::CloseDelim(token::Paren),
7676
"SLASH" => token::BinOp(token::Slash),
7777
"COMMA" => token::Comma,
@@ -80,8 +80,8 @@ fn parse_token_list(file: &str) -> HashMap<String, token::Token> {
8080
"TILDE" => token::Tilde,
8181
"IDENT" => id(),
8282
"PLUS" => token::BinOp(token::Plus),
83-
"LIT_CHAR" => token::Literal(token::Char(Name(0))),
84-
"LIT_BYTE" => token::Literal(token::Byte(Name(0))),
83+
"LIT_CHAR" => token::Literal(token::Char(Name(0)), None),
84+
"LIT_BYTE" => token::Literal(token::Byte(Name(0)), None),
8585
"EQ" => token::Eq,
8686
"RBRACKET" => token::CloseDelim(token::Bracket),
8787
"COMMENT" => token::Comment,
@@ -95,9 +95,9 @@ fn parse_token_list(file: &str) -> HashMap<String, token::Token> {
9595
"BINOP" => token::BinOp(token::Plus),
9696
"POUND" => token::Pound,
9797
"OROR" => token::OrOr,
98-
"LIT_INTEGER" => token::Literal(token::Integer(Name(0))),
98+
"LIT_INTEGER" => token::Literal(token::Integer(Name(0)), None),
9999
"BINOPEQ" => token::BinOpEq(token::Plus),
100-
"LIT_FLOAT" => token::Literal(token::Float(Name(0))),
100+
"LIT_FLOAT" => token::Literal(token::Float(Name(0)), None),
101101
"WHITESPACE" => token::Whitespace,
102102
"UNDERSCORE" => token::Underscore,
103103
"MINUS" => token::BinOp(token::Minus),
@@ -107,8 +107,8 @@ fn parse_token_list(file: &str) -> HashMap<String, token::Token> {
107107
"OR" => token::BinOp(token::Or),
108108
"GT" => token::Gt,
109109
"LE" => token::Le,
110-
"LIT_BINARY" => token::Literal(token::Binary(Name(0))),
111-
"LIT_BINARY_RAW" => token::Literal(token::BinaryRaw(Name(0), 0)),
110+
"LIT_BINARY" => token::Literal(token::Binary(Name(0)), None),
111+
"LIT_BINARY_RAW" => token::Literal(token::BinaryRaw(Name(0), 0), None),
112112
_ => continue,
113113
};
114114

@@ -189,17 +189,17 @@ fn parse_antlr_token(s: &str, tokens: &HashMap<String, token::Token>) -> TokenAn
189189
token::BinOp(..) => token::BinOp(str_to_binop(content)),
190190
token::BinOpEq(..) => token::BinOpEq(str_to_binop(content.slice_to(
191191
content.len() - 1))),
192-
token::Literal(token::Str_(..)) => token::Literal(token::Str_(fix(content))),
193-
token::Literal(token::StrRaw(..)) => token::Literal(token::StrRaw(fix(content),
194-
count(content))),
195-
token::Literal(token::Char(..)) => token::Literal(token::Char(fixchar(content))),
196-
token::Literal(token::Byte(..)) => token::Literal(token::Byte(fixchar(content))),
192+
token::Literal(token::Str_(..), n) => token::Literal(token::Str_(fix(content)), n),
193+
token::Literal(token::StrRaw(..), n) => token::Literal(token::StrRaw(fix(content),
194+
count(content)), n),
195+
token::Literal(token::Char(..), n) => token::Literal(token::Char(fixchar(content)), n),
196+
token::Literal(token::Byte(..), n) => token::Literal(token::Byte(fixchar(content)), n),
197197
token::DocComment(..) => token::DocComment(nm),
198-
token::Literal(token::Integer(..)) => token::Literal(token::Integer(nm)),
199-
token::Literal(token::Float(..)) => token::Literal(token::Float(nm)),
200-
token::Literal(token::Binary(..)) => token::Literal(token::Binary(nm)),
201-
token::Literal(token::BinaryRaw(..)) => token::Literal(token::BinaryRaw(fix(content),
202-
count(content))),
198+
token::Literal(token::Integer(..), n) => token::Literal(token::Integer(nm), n),
199+
token::Literal(token::Float(..), n) => token::Literal(token::Float(nm), n),
200+
token::Literal(token::Binary(..), n) => token::Literal(token::Binary(nm), n),
201+
token::Literal(token::BinaryRaw(..), n) => token::Literal(token::BinaryRaw(fix(content),
202+
count(content)), n),
203203
token::Ident(..) => token::Ident(ast::Ident { name: nm, ctxt: 0 },
204204
token::ModName),
205205
token::Lifetime(..) => token::Lifetime(ast::Ident { name: nm, ctxt: 0 }),
@@ -214,8 +214,8 @@ fn parse_antlr_token(s: &str, tokens: &HashMap<String, token::Token>) -> TokenAn
214214
};
215215

216216
let sp = syntax::codemap::Span {
217-
lo: syntax::codemap::BytePos(from_str::<u32>(start).unwrap() - offset),
218-
hi: syntax::codemap::BytePos(from_str::<u32>(end).unwrap() + 1),
217+
lo: syntax::codemap::BytePos(start.parse::<u32>().unwrap() - offset),
218+
hi: syntax::codemap::BytePos(end.parse::<u32>().unwrap() + 1),
219219
expn_id: syntax::codemap::NO_EXPANSION
220220
};
221221

@@ -247,7 +247,9 @@ fn main() {
247247
let token_map = parse_token_list(token_file.read_to_string().unwrap().as_slice());
248248

249249
let mut stdin = std::io::stdin();
250-
let mut antlr_tokens = stdin.lines().map(|l| parse_antlr_token(l.unwrap().as_slice().trim(),
250+
let mut lock = stdin.lock();
251+
let lines = lock.lines();
252+
let mut antlr_tokens = lines.map(|l| parse_antlr_token(l.unwrap().as_slice().trim(),
251253
&token_map));
252254

253255
let code = File::open(&Path::new(args[1].as_slice())).unwrap().read_to_string().unwrap();
@@ -284,17 +286,17 @@ fn main() {
284286
ref c => assert!(c == &antlr_tok.tok, "{} is not {}", rustc_tok, antlr_tok)
285287
}
286288
)
287-
)
289+
);
288290

289291
matches!(
290-
token::Literal(token::Byte(..)),
291-
token::Literal(token::Char(..)),
292-
token::Literal(token::Integer(..)),
293-
token::Literal(token::Float(..)),
294-
token::Literal(token::Str_(..)),
295-
token::Literal(token::StrRaw(..)),
296-
token::Literal(token::Binary(..)),
297-
token::Literal(token::BinaryRaw(..)),
292+
token::Literal(token::Byte(..), _),
293+
token::Literal(token::Char(..), _),
294+
token::Literal(token::Integer(..), _),
295+
token::Literal(token::Float(..), _),
296+
token::Literal(token::Str_(..), _),
297+
token::Literal(token::StrRaw(..), _),
298+
token::Literal(token::Binary(..), _),
299+
token::Literal(token::BinaryRaw(..), _),
298300
token::Ident(..),
299301
token::Lifetime(..),
300302
token::Interpolated(..),

0 commit comments

Comments
 (0)