Skip to content

Commit e7a9877

Browse files
committed
---
yaml --- r: 114410 b: refs/heads/master c: a0960a1 h: refs/heads/master v: v3
1 parent 31e45ca commit e7a9877

File tree

341 files changed

+4590
-3381
lines changed

Some content is hidden

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

341 files changed

+4590
-3381
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 711f531b655941b163303062562047767967ea84
2+
refs/heads/master: a0960a12239a473c2608e068824f565d6cd63966
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ec0258a381b88b5574e3f8ce72ae553ac3a574b7
55
refs/heads/try: 7c6c492fb2af9a85f21ff952942df3523b22fd17

trunk/mk/target.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
7474
$$(CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4)) \
7575
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
7676
| $$(TLIB$(1)_T_$(2)_H_$(3))/
77-
@$$(call E, oxidize: $$(@D)/lib$(4))
77+
@$$(call E, rustc: $$(@D)/lib$(4))
7878
$$(call REMOVE_ALL_OLD_GLOB_MATCHES,\
7979
$$(dir $$@)$$(call CFG_LIB_GLOB_$(2),$(4)))
8080
$$(call REMOVE_ALL_OLD_GLOB_MATCHES,\
@@ -114,7 +114,7 @@ $$(TBIN$(1)_T_$(2)_H_$(3))/$(4)$$(X_$(2)): \
114114
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(dep)) \
115115
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
116116
| $$(TBIN$(1)_T_$(4)_H_$(3))/
117-
@$$(call E, oxidize: $$@)
117+
@$$(call E, rustc: $$@)
118118
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --cfg $(4)
119119

120120
endef

trunk/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): CFG_COMPILER_HOST_TRIPLE = $(2)
372372
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
373373
$$(CRATEFILE_$(4)) \
374374
$$(TESTDEP_$(1)_$(2)_$(3)_$(4))
375-
@$$(call E, oxidize: $$@)
375+
@$$(call E, rustc: $$@)
376376
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test \
377377
-L "$$(RT_OUTPUT_DIR_$(2))" \
378378
-L "$$(LLVM_LIBDIR_$(2))"

trunk/src/compiletest/compiletest.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pub fn parse_config(args: Vec<StrBuf> ) -> Config {
9696
let args_ = args.tail();
9797
if args.get(1).as_slice() == "-h" || args.get(1).as_slice() == "--help" {
9898
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
99-
println!("{}", getopts::usage(message, groups.as_slice()));
99+
println!("{}", getopts::usage(message.as_slice(), groups.as_slice()));
100100
println!("");
101101
fail!()
102102
}
@@ -109,7 +109,7 @@ pub fn parse_config(args: Vec<StrBuf> ) -> Config {
109109

110110
if matches.opt_present("h") || matches.opt_present("help") {
111111
let message = format!("Usage: {} [OPTIONS] [TESTNAME...]", argv0);
112-
println!("{}", getopts::usage(message, groups.as_slice()));
112+
println!("{}", getopts::usage(message.as_slice(), groups.as_slice()));
113113
println!("");
114114
fail!()
115115
}
@@ -323,11 +323,15 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
323323
let mut valid = false;
324324

325325
for ext in valid_extensions.iter() {
326-
if name.ends_with(*ext) { valid = true; }
326+
if name.ends_with(ext.as_slice()) {
327+
valid = true;
328+
}
327329
}
328330

329331
for pre in invalid_prefixes.iter() {
330-
if name.starts_with(*pre) { valid = false; }
332+
if name.starts_with(pre.as_slice()) {
333+
valid = false;
334+
}
331335
}
332336

333337
return valid;

trunk/src/compiletest/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub fn load_errors(re: &Regex, testfile: &Path) -> Vec<ExpectedError> {
2424
let mut rdr = BufferedReader::new(File::open(testfile).unwrap());
2525

2626
rdr.lines().enumerate().filter_map(|(line_no, ln)| {
27-
parse_expected(line_no + 1, ln.unwrap(), re)
27+
parse_expected(line_no + 1, ln.unwrap().as_slice(), re)
2828
}).collect()
2929
}
3030

trunk/src/compiletest/header.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,14 @@ fn iter_header(testfile: &Path, it: |&str| -> bool) -> bool {
157157
// module or function. This doesn't seem to be an optimization
158158
// with a warm page cache. Maybe with a cold one.
159159
let ln = ln.unwrap();
160-
if ln.starts_with("fn") || ln.starts_with("mod") {
160+
if ln.as_slice().starts_with("fn") ||
161+
ln.as_slice().starts_with("mod") {
161162
return true;
162-
} else { if !(it(ln.trim())) { return false; } }
163+
} else {
164+
if !(it(ln.as_slice().trim())) {
165+
return false;
166+
}
167+
}
163168
}
164169
return true;
165170
}

trunk/src/compiletest/procsrv.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ use std::unstable::dynamic_lib::DynamicLibrary;
1515

1616
fn target_env(lib_path: &str, prog: &str) -> Vec<(StrBuf, StrBuf)> {
1717
let prog = if cfg!(windows) {prog.slice_to(prog.len() - 4)} else {prog};
18-
let aux_path = prog + ".libaux";
18+
let mut aux_path = prog.to_strbuf();
19+
aux_path.push_str(".libaux");
1920

2021
// Need to be sure to put both the lib_path and the aux path in the dylib
2122
// search path for the child.

trunk/src/compiletest/runtest.rs

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,10 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
351351
cmds,
352352
"quit".to_strbuf()].connect("\n");
353353
debug!("script_str = {}", script_str);
354-
dump_output_file(config, testfile, script_str, "debugger.script");
354+
dump_output_file(config,
355+
testfile,
356+
script_str.as_slice(),
357+
"debugger.script");
355358

356359

357360
procsrv::run("",
@@ -459,7 +462,10 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
459462
"quit\n".to_strbuf()
460463
].connect("\n");
461464
debug!("script_str = {}", script_str);
462-
dump_output_file(config, testfile, script_str, "debugger.script");
465+
dump_output_file(config,
466+
testfile,
467+
script_str.as_slice(),
468+
"debugger.script");
463469

464470
// run debugger script with gdb
465471
#[cfg(windows)]
@@ -538,7 +544,8 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
538544

539545
// Set breakpoints on every line that contains the string "#break"
540546
for line in breakpoint_lines.iter() {
541-
script_str.push_str(format!("breakpoint set --line {}\n", line));
547+
script_str.push_str(format!("breakpoint set --line {}\n",
548+
line).as_slice());
542549
}
543550

544551
// Append the other commands
@@ -552,7 +559,10 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
552559

553560
// Write the script into a file
554561
debug!("script_str = {}", script_str);
555-
dump_output_file(config, testfile, script_str.into_owned(), "debugger.script");
562+
dump_output_file(config,
563+
testfile,
564+
script_str.as_slice(),
565+
"debugger.script");
556566
let debugger_script = make_out_name(config, testfile, "debugger.script");
557567

558568
// Let LLDB execute the script via lldb_batchmode.py
@@ -609,8 +619,8 @@ fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
609619
-> DebuggerCommands {
610620
use std::io::{BufferedReader, File};
611621

612-
let command_directive = debugger_prefix + "-command";
613-
let check_directive = debugger_prefix + "-check";
622+
let command_directive = format!("{}-command", debugger_prefix);
623+
let check_directive = format!("{}-check", debugger_prefix);
614624

615625
let mut breakpoint_lines = vec!();
616626
let mut commands = vec!();
@@ -620,18 +630,18 @@ fn parse_debugger_commands(file_path: &Path, debugger_prefix: &str)
620630
for line in reader.lines() {
621631
match line {
622632
Ok(line) => {
623-
if line.contains("#break") {
633+
if line.as_slice().contains("#break") {
624634
breakpoint_lines.push(counter);
625635
}
626636

627637
header::parse_name_value_directive(
628-
line,
638+
line.as_slice(),
629639
command_directive.to_strbuf()).map(|cmd| {
630640
commands.push(cmd)
631641
});
632642

633643
header::parse_name_value_directive(
634-
line,
644+
line.as_slice(),
635645
check_directive.to_strbuf()).map(|cmd| {
636646
check_lines.push(cmd)
637647
});

trunk/src/doc/complement-cheatsheet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ To return an Owned String (StrBuf) use the str helper function
6464
~~~
6565
use std::str;
6666
67-
let x: Result<StrBuf,~[u8]> =
68-
str::from_utf8_owned(~[104u8,105u8]).map(|x| x.to_strbuf());
67+
let x: Option<StrBuf> =
68+
str::from_utf8([ 104u8, 105u8 ]).map(|x| x.to_strbuf());
6969
let y: StrBuf = x.unwrap();
7070
~~~
7171

trunk/src/doc/guide-ffi.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,7 @@ are:
493493
* `rust-intrinsic`
494494
* `system`
495495
* `C`
496+
* `win64`
496497

497498
Most of the abis in this list are self-explanatory, but the `system` abi may
498499
seem a little odd. This constraint selects whatever the appropriate ABI is for

trunk/src/etc/vim/syntax/rust.vim

Lines changed: 43 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,40 @@ syn keyword rustOperator as
1818

1919
syn match rustAssert "\<assert\(\w\)*!" contained
2020
syn match rustFail "\<fail\(\w\)*!" contained
21-
syn keyword rustKeyword break box continue
22-
syn keyword rustKeyword extern nextgroup=rustExternCrate,rustObsoleteExternMod skipwhite
21+
syn keyword rustKeyword break
22+
syn keyword rustKeyword box nextgroup=rustBoxPlacement skipwhite skipempty
23+
syn keyword rustKeyword continue
24+
syn keyword rustKeyword extern nextgroup=rustExternCrate,rustObsoleteExternMod skipwhite skipempty
25+
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite skipempty
2326
syn keyword rustKeyword for in if impl let
24-
syn keyword rustKeyword loop once priv pub
25-
syn keyword rustKeyword return
26-
syn keyword rustKeyword unsafe while
27-
syn keyword rustKeyword use nextgroup=rustModPath skipwhite
27+
syn keyword rustKeyword loop once proc pub
28+
syn keyword rustKeyword return super
29+
syn keyword rustKeyword unsafe virtual while
30+
syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty
2831
" FIXME: Scoped impl's name is also fallen in this category
29-
syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite
30-
syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite
31-
syn keyword rustKeyword proc
32+
syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite skipempty
3233
syn keyword rustStorage mut ref static
3334
syn keyword rustObsoleteStorage const
3435

3536
syn keyword rustInvalidBareKeyword crate
3637

37-
syn keyword rustExternCrate crate contained nextgroup=rustIdentifier skipwhite
38-
syn keyword rustObsoleteExternMod mod contained nextgroup=rustIdentifier skipwhite
38+
syn keyword rustExternCrate crate contained nextgroup=rustIdentifier skipwhite skipempty
39+
syn keyword rustObsoleteExternMod mod contained nextgroup=rustIdentifier skipwhite skipempty
3940

4041
syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
4142
syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained
4243

44+
syn region rustBoxPlacement matchgroup=rustBoxPlacementParens start="(" end=")" contains=TOP contained
45+
syn keyword rustBoxPlacementExpr GC containedin=rustBoxPlacement
46+
" Ideally we'd have syntax rules set up to match arbitrary expressions. Since
47+
" we don't, we'll just define temporary contained rules to handle balancing
48+
" delimiters.
49+
syn region rustBoxPlacementBalance start="(" end=")" containedin=rustBoxPlacement transparent
50+
syn region rustBoxPlacementBalance start="\[" end="\]" containedin=rustBoxPlacement transparent
51+
" {} are handled by rustFoldBraces
52+
4353
" Reserved (but not yet used) keywords {{{2
44-
syn keyword rustReservedKeyword alignof be do offsetof pure sizeof typeof yield
54+
syn keyword rustReservedKeyword alignof be do offsetof priv pure sizeof typeof unsized yield
4555

4656
" Built-in types {{{2
4757
syn keyword rustType int uint float char bool u8 u16 u32 u64 f32
@@ -52,10 +62,10 @@ syn keyword rustType f64 i8 i16 i32 i64 str Self
5262
" to make it easy to update.
5363

5464
" Core operators {{{3
55-
syn keyword rustTrait Share Copy Send Sized
65+
syn keyword rustTrait Copy Send Sized Share
5666
syn keyword rustTrait Add Sub Mul Div Rem Neg Not
5767
syn keyword rustTrait BitAnd BitOr BitXor
58-
syn keyword rustTrait Drop
68+
syn keyword rustTrait Drop Deref DerefMut
5969
syn keyword rustTrait Shl Shr Index
6070
syn keyword rustEnum Option
6171
syn keyword rustEnumVariant Some None
@@ -68,7 +78,6 @@ syn keyword rustEnumVariant Ok Err
6878
"syn keyword rustFunction drop
6979

7080
" Types and traits {{{3
71-
syn keyword rustTrait Any AnyOwnExt AnyRefExt AnyMutRefExt
7281
syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr IntoBytes
7382
syn keyword rustTrait ToCStr
7483
syn keyword rustTrait Char
@@ -80,25 +89,32 @@ syn keyword rustTrait FromIterator Extendable
8089
syn keyword rustTrait Iterator DoubleEndedIterator RandomAccessIterator CloneableIterator
8190
syn keyword rustTrait OrdIterator MutableDoubleEndedIterator ExactSize
8291
syn keyword rustTrait Num NumCast CheckedAdd CheckedSub CheckedMul
83-
syn keyword rustTrait Signed Unsigned Round
84-
syn keyword rustTrait Primitive Int Float ToPrimitive FromPrimitive
92+
syn keyword rustTrait Signed Unsigned
93+
syn keyword rustTrait Primitive Int Float FloatMath ToPrimitive FromPrimitive
94+
"syn keyword rustTrait Expect
95+
syn keyword rustTrait Box
8596
syn keyword rustTrait GenericPath Path PosixPath WindowsPath
8697
syn keyword rustTrait RawPtr
8798
syn keyword rustTrait Buffer Writer Reader Seek
88-
syn keyword rustTrait Str StrVector StrSlice OwnedStr IntoMaybeOwned StrBuf
99+
syn keyword rustTrait Str StrVector StrSlice OwnedStr IntoMaybeOwned
100+
syn keyword rustTrait StrAllocating
89101
syn keyword rustTrait ToStr IntoStr
90102
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
91103
syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8
92104
syn keyword rustTrait Tuple9 Tuple10 Tuple11 Tuple12
93-
syn keyword rustTrait ImmutableEqVector ImmutableTotalOrdVector ImmutableCloneableVector
94-
syn keyword rustTrait OwnedVector OwnedCloneableVector OwnedEqVector
95-
syn keyword rustTrait MutableVector MutableTotalOrdVector
96-
syn keyword rustTrait Vector VectorVector CloneableVector ImmutableVector
97-
98-
"syn keyword rustFunction stream
99-
syn keyword rustTrait Sender Receiver
105+
syn keyword rustTrait CloneableVector ImmutableCloneableVector MutableCloneableVector
106+
syn keyword rustTrait ImmutableVector MutableVector
107+
syn keyword rustTrait ImmutableEqVector ImmutableTotalOrdVector MutableTotalOrdVector
108+
syn keyword rustTrait Vector VectorVector OwnedVector MutableVectorAllocating
109+
syn keyword rustTrait StrBuf
110+
syn keyword rustTrait Vec
111+
112+
"syn keyword rustFunction sync_channel channel
113+
syn keyword rustTrait SyncSender Sender Receiver
100114
"syn keyword rustFunction spawn
101115

116+
"syn keyword rustConstant GC
117+
102118
syn keyword rustSelf self
103119
syn keyword rustBoolean true false
104120

@@ -239,6 +255,8 @@ hi def link rustLifetime Special
239255
hi def link rustInvalidBareKeyword Error
240256
hi def link rustExternCrate rustKeyword
241257
hi def link rustObsoleteExternMod Error
258+
hi def link rustBoxPlacementParens Delimiter
259+
hi def link rustBoxPlacementExpr rustKeyword
242260

243261
" Other Suggestions:
244262
" hi rustAttribute ctermfg=cyan

0 commit comments

Comments
 (0)