Skip to content

Commit d4e346b

Browse files
committed
---
yaml --- r: 155261 b: refs/heads/try2 c: ce0907e h: refs/heads/master i: 155259: 6238386 v: v3
1 parent 33f1654 commit d4e346b

File tree

137 files changed

+1629
-2388
lines changed

Some content is hidden

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

137 files changed

+1629
-2388
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: 81ee3586b5d75497af25e77756be8f629d711aaf
8+
refs/heads/try2: ce0907e46e8e1aa23ee39f69e4f628f68bfbb0d7
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/etc/zsh/_rust

Lines changed: 68 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -4,166 +4,109 @@ local -a _rustc_opts_switches _rustc_opts_lint _rustc_opts_debug
44

55
typeset -A opt_args
66

7-
_rustc_debuginfo_levels=(
8-
"0[no debug info]"
9-
"1[line-tables only (for stacktraces and breakpoints)]"
10-
"2[full debug info with variable and type information (same as -g)]"
11-
)
12-
13-
_rustc_crate_types=(
14-
'bin'
15-
'lib'
16-
'rlib'
17-
'dylib'
18-
'staticlib'
19-
)
20-
21-
_rustc_emit_types=(
22-
'asm'
23-
'bc'
24-
'ir'
25-
'obj'
26-
'link'
27-
)
28-
_rustc_pretty_types=(
29-
'normal[un-annotated source]'
30-
'expanded[crates expanded]'
31-
'typed[crates expanded, with type annotations]'
32-
'identified[fully parenthesized, AST nodes and blocks with IDs]'
33-
'flowgraph=[graphviz formatted flowgraph for node]:NODEID:'
34-
)
35-
_rustc_color_types=(
36-
'auto[colorize, if output goes to a tty (default)]'
37-
'always[always colorize output]'
38-
'never[never colorize output]'
39-
)
40-
41-
_rustc_opts_vals=(
42-
--crate-name='[Specify the name of the crate being built]'
43-
--crate-type='[Comma separated list of types of crates for the compiler to emit]:TYPES:_values -s "," "Crate types" "$_rustc_crate_types[@]"'
44-
--emit='[Comma separated list of types of output for the compiler to emit]:TYPES:_values -s "," "Emit Targets" "$_rustc_emit_types[@]"'
45-
--debuginfo='[Emit DWARF debug info to the objects created]:LEVEL:_values "Debug Levels" "$_rustc_debuginfo_levels[@]"'
46-
--dep-info='[Output dependency info to <filename> after compiling]::FILE:_files -/'
47-
--sysroot='[Override the system root]:PATH:_files -/'
48-
--cfg='[Configure the compilation environment]:SPEC:'
49-
--out-dir='[Write output to compiler-chosen filename in <dir>. Ignored if -o is specified. (default the current directory)]:DIR:_files -/'
50-
-o'[Write output to <filename>. Ignored if more than one --emit is specified.]:FILENAME:_files'
51-
--opt-level='[Optimize with possible levels 0-3]:LEVEL:(0 1 2 3)'
52-
--pretty='[Pretty-print the input instead of compiling]::TYPE:_values "TYPES" "$_rustc_pretty_types[@]"'
53-
-L'[Add a directory to the library search path]:DIR:_files -/'
54-
--target='[Target triple cpu-manufacturer-kernel\[-os\] to compile]:TRIPLE:'
55-
--color='[Configure coloring of output]:CONF:_values "COLORS" "$_rustc_color_types[@]"'
56-
{-v,--version}'[Print version info and exit]::VERBOSE:(verbose)'
57-
--explain='[Provide a detailed explanation of an error message]:OPT:'
58-
--extern'[Specify where an external rust library is located]:ARG:'
59-
)
60-
617
_rustc_opts_switches=(
8+
--ar'[Program to use for managing archives instead of the default.]'
9+
-c'[Compile and assemble, but do not link]'
10+
--cfg'[Configure the compilation environment]'
11+
--crate-id'[Output the crate id and exit]'
12+
--crate-file-name'[deprecated in favor of --print-file-name]'
13+
--crate-name'[Specify the name of the crate being built]'
14+
--crate-type'[Specify the type of crate to crate]'
15+
--debuginfo'[Emit DWARF debug info to the objects created: 0 = no debug info, 1 = line-tables only (for stacktraces and breakpoints), 2 = full debug info with variable and type information (same as -g)]'
16+
--dep-info'[Output dependency info to <filename> after compiling]'
6217
-g'[Equivalent to --debuginfo=2]'
6318
{-h,--help}'[Display this message]'
19+
-L'[Add a directory to the library search path]'
20+
--linker'[Program to use for linking instead of the default.]'
21+
--link-args'[FLAGS is a space-separated list of flags passed to the linker]'
22+
--llvm-args'[A list of arguments to pass to llvm, comma separated]'
23+
--ls'[List the symbols defined by a library crate]'
6424
--no-analysis'[Parse and expand the output, but run no analysis or produce output]'
25+
--no-rpath'[Disables setting the rpath in libs/exes]'
6526
--no-trans'[Run all passes except translation; no output]'
6627
-O'[Equivalent to --opt-level=2]'
28+
-o'[Write output to <filename>]'
29+
--opt-level'[Optimize with possible levels 0-3]'
30+
--out-dir'[Write output to compiler-chosen filename in <dir>]'
6731
--parse-only'[Parse only; do not compile, assemble, or link]'
32+
--passes'[Comma or space separated list of pass names to use]'
33+
--pretty'[Pretty-print the input instead of compiling]'
6834
--print-crate-name'[Output the crate name and exit]'
6935
--print-file-name'[Output the file(s) that would be written if compilation continued and exit]'
36+
--save-temps'[Write intermediate files (.bc, .opt.bc, .o) in addition to normal output]'
37+
--sysroot'[Override the system root]'
7038
--test'[Build a test harness]'
39+
--target'[Target triple cpu-manufacturer-kernel\[-os\] to compile]'
40+
--target-cpu'[Select target processor (llc -mcpu=help for details)]'
41+
--target-feature'[Target specific attributes (llc -mattr=help for details)]'
42+
--relocation-model'[Relocation model (llc --help for details)]'
43+
{-v,--version}'[Print version info and exit]'
7144
)
72-
_rustc_opts_codegen=(
73-
'ar=[Path to the archive utility to use when assembling archives.]:BIN:_path_files'
74-
'linker=[Path to the linker utility to use when linking libraries, executables, and objects.]:BIN:_path_files'
75-
'link-args=[A space-separated list of extra arguments to pass to the linker when the linker is invoked.]:ARGS:'
76-
'target-cpu=[Selects a target processor. If the value is "help", then a list of available CPUs is printed.]:CPU:'
77-
'target-feature=[A space-separated list of features to enable or disable for the target. A preceding "+" enables a feature while a preceding "-" disables it. Available features can be discovered through target-cpu=help.]:FEATURE:'
78-
'passes=[A space-separated list of extra LLVM passes to run. A value of "list" will cause rustc to print all known passes and exit. The passes specified are appended at the end of the normal pass manager.]:LIST:'
79-
'llvm-args=[A space-separated list of arguments to pass through to LLVM.]:ARGS:'
80-
'save-temps[If specified, the compiler will save more files (.bc, .o, .no-opt.bc) generated throughout compilation in the output directory.]'
81-
'rpath[If specified, then the rpath value for dynamic libraries will be set in either dynamic library or executable outputs.]'
82-
'no-prepopulate-passes[Suppresses pre-population of the LLVM pass manager that is run over the module.]'
83-
'no-vectorize-loops[Suppresses running the loop vectorization LLVM pass, regardless of optimization level.]'
84-
'no-vectorize-slp[Suppresses running the LLVM SLP vectorization pass, regardless of optimization level.]'
85-
'soft-float[Generates software floating point library calls instead of hardware instructions.]'
86-
'prefer-dynamic[Prefers dynamic linking to static linking.]'
87-
"no-integrated-as[Force usage of an external assembler rather than LLVM's integrated one.]"
88-
'no-redzone[disable the use of the redzone]'
89-
'relocation-model=[The relocation model to use. (default: pic)]:MODEL:(pic static dynamic-no-pic)'
90-
'code-model=[choose the code model to use (llc -code-model for details)]:MODEL:'
91-
'metadata=[metadata to mangle symbol names with]:VAL:'
92-
'extra-filenames=[extra data to put in each output filename]:VAL:'
93-
'codegen-units=[divide crate into N units to optimize in parallel]:N:'
94-
'help[Show all codegen options]'
95-
)
96-
9745
_rustc_opts_lint=(
98-
'help[Show a list of all lints]'
99-
'experimental[detects use of #\[experimental\] items]'
100-
'heap-memory[use of any (Box type or @ type) heap memory]'
101-
'managed-heap-memory[use of managed (@ type) heap memory]'
102-
'missing-doc[detects missing documentation for public members]'
103-
'non-uppercase-statics[static constants should have uppercase identifiers]'
104-
'owned-heap-memory[use of owned (~ type) heap memory]'
105-
'unnecessary-qualification[detects unnecessarily qualified names]'
106-
'unsafe-block[usage of an `unsafe` block]'
107-
'unstable[detects use of #\[unstable\] items (incl. items with no stability attribute)]'
108-
'unused-result[unused result of an expression in a statement]'
109-
'variant-size-difference[detects enums with widely varying variant sizes]'
46+
'attribute-usage[detects bad use of attributes]'
11047
'ctypes[proper use of libc types in foreign modules]'
11148
'dead-assignment[detect assignments that will never be read]'
11249
'dead-code[detect piece of code that will never be used]'
50+
'default-type-param-usage[prevents explicitly setting a type parameter with a default]'
11351
'deprecated[detects use of #\[deprecated\] items]'
52+
'experimental[detects use of #\[experimental\] items]'
53+
'heap-memory[use of any (~ type or @ type) heap memory]'
54+
'managed-heap-memory[use of managed (@ type) heap memory]'
55+
'missing-doc[detects missing documentation for public members]'
11456
'non-camel-case-types[types, variants and traits should have camel case names]'
115-
'non-snake-case[methods, functions, lifetime parameters and modules should have snake case names]'
57+
'non-uppercase-pattern-statics[static constants in match patterns should be all caps]'
58+
'non-uppercase-statics[static constants should have uppercase identifiers]'
59+
'owned-heap-memory[use of owned (~ type) heap memory]'
11660
'path-statement[path statements with no effect]'
117-
'raw-pointer-deriving[uses of #\[deriving\] with raw pointers are rarely correct]'
11861
'type-limits[comparisons made useless by limits of the types involved]'
11962
'type-overflow[literal out of range for its type]'
63+
'unknown-crate-type[unknown crate type found in #\[crate_type\] directive]'
64+
'unknown-features[unknown features found in crate-level #\[feature\] directives]'
12065
'unnecessary-allocation[detects unnecessary allocations that can be eliminated]'
12166
'unnecessary-parens[`if`, `match`, `while` and `return` do not need parentheses]'
67+
'unnecessary-qualification[detects unnecessarily qualified names]'
68+
'unnecessary-typecast[detects unnecessary type casts, that can be removed]'
12269
'unreachable-code[detects unreachable code]'
12370
'unrecognized-lint[unrecognized lint attribute]'
124-
'unsigned-negate[using an unary minus operator on unsigned type]'
125-
'unused-attribute[detects attributes that were not used by the compiler]'
71+
'unsafe-block[usage of an `unsafe` block]'
72+
'unstable[detects use of #\[unstable\] items (incl. items with no stability attribute)]'
12673
'unused-imports[imports that are never used]'
12774
'unused-must-use[unused result of a type flagged as #\[must_use\]]'
12875
"unused-mut[detect mut variables which don't need to be mutable]"
76+
'unused-result[unused result of an expression in a statement]'
12977
'unused-unsafe[unnecessary use of an `unsafe` block]'
13078
'unused-variable[detect variables which are not used in any way]'
131-
'visible-private-types[detect use of private types in exported type signatures]'
13279
'warnings[mass-change the level for lints which produce warnings]'
13380
'while-true[suggest using `loop { }` instead of `while true { }`]'
134-
'unknown-crate-type[unknown crate type found in #\[crate_type\] directive]'
135-
'unknown-features[unknown features found in crate-level #\[feature\] directives]'
136-
'bad-style[group of non_camel_case_types, non_snake_case, non_uppercase_statics]'
137-
'unused[group of unused_imports, unused_variable, dead_assignment, dead_code, unused_mut, unreachable_code]'
13881
)
13982

14083
_rustc_opts_debug=(
141-
'verbose[in general, enable more debug printouts]'
142-
'time-passes[measure time of each rustc pass]'
143-
'count-llvm-insns[count where LLVM instrs originate]'
144-
'time-llvm-passes[measure time of each LLVM pass]'
145-
'trans-stats[gather trans statistics]'
14684
'asm-comments[generate comments into the assembly (may change behavior)]'
147-
'no-verify[skip LLVM verification]'
14885
'borrowck-stats[gather borrowck statistics]'
149-
'no-landing-pads[omit landing pads for unwinding]'
150-
'debug-llvm[enable debug output from LLVM]'
151-
'show-span[show spans for compiler debugging]'
86+
'count-llvm-insns[count where LLVM instrs originate]'
15287
'count-type-sizes[count the sizes of aggregate types]'
88+
'debug-info[Produce debug info (experimental)]'
89+
'debug-llvm[enable debug output from LLVM]'
90+
'extra-debug-info[Extra debugging info (experimental)]'
91+
'gc[Garbage collect shared data (experimental)]'
92+
'gen-crate-map[Force generation of a toplevel crate map]'
93+
'lto[Perform LLVM link-time optimizations]'
15394
'meta-stats[gather metadata statistics]'
95+
"no-integrated-as[Use external assembler rather than LLVM's integrated one]"
96+
'no-landing-pads[omit landing pads for unwinding]'
15497
'no-opt[do not optimize, even if -O is passed]'
98+
"no-prepopulate-passes[Don't pre-populate the pass managers with a list of passes, only use the passes from --passes]"
99+
"no-vectorize-loops[Don't run the loop vectorization optimization passes]"
100+
"no-vectorize-slp[Don't run LLVM's SLP vectorization passes]"
101+
'no-verify[skip LLVM verification]'
102+
'prefer-dynamic[Prefer dynamic linking to static linking]'
155103
'print-link-args[Print the arguments passed to the linker]'
156-
'gc[Garbage collect shared data (experimental)]'
157104
'print-llvm-passes[Prints the llvm optimization passes being run]'
158-
'lto[Perform LLVM link-time optimizations]'
159-
'ast-json[Print the AST as JSON and halt]'
160-
'ast-json-noexpand[Print the pre-expansion AST as JSON and halt]'
161-
'ls[List the symbols defined by a library crate]'
162-
'save-analysis[Write syntax and type analysis information in addition to normal output]'
163-
'flowgraph-print-loans[Include loan analysis data in --pretty flowgraph output]'
164-
'flowgraph-print-moves[Include move analysis data in --pretty flowgraph output]'
165-
'flowgraph-print-assigns[Include assignment analysis data in --pretty flowgraph output]'
166-
'flowgraph-print-all[Include all dataflow analysis data in --pretty flowgraph output]'
105+
'soft-float[Generate software floating point library calls]'
106+
'time-llvm-passes[measure time of each LLVM pass]'
107+
'time-passes[measure time of each rustc pass]'
108+
'trans-stats[gather trans statistics]'
109+
'verbose[in general, enable more debug printouts]'
167110
)
168111

169112
_rustc_opts_fun_lint(){
@@ -172,20 +115,14 @@ _rustc_opts_fun_lint(){
172115
}
173116

174117
_rustc_opts_fun_debug(){
175-
_values 'options' "$_rustc_opts_debug[@]"
176-
}
177-
178-
_rustc_opts_fun_codegen(){
179-
_values 'options' "$_rustc_opts_codegen[@]"
118+
_describe 'options' _rustc_opts_debug
180119
}
181120

182121
_arguments -s : \
183-
'(-W --warn)'{-W,--warn=}'[Set lint warnings]:lint options:_rustc_opts_fun_lint' \
184-
'(-A --allow)'{-A,--allow=}'[Set lint allowed]:lint options:_rustc_opts_fun_lint' \
185-
'(-D --deny)'{-D,--deny=}'[Set lint denied]:lint options:_rustc_opts_fun_lint' \
186-
'(-F --forbid)'{-F,--forbid=}'[Set lint forbidden]:lint options:_rustc_opts_fun_lint' \
122+
'(-W --warn)'{-W,--warn}'[Set lint warnings]:lint options:_rustc_opts_fun_lint' \
123+
'(-A --allow)'{-A,--allow}'[Set lint allowed]:lint options:_rustc_opts_fun_lint' \
124+
'(-D --deny)'{-D,--deny}'[Set lint denied]:lint options:_rustc_opts_fun_lint' \
125+
'(-F --forbid)'{-F,--forbid}'[Set lint forbidden]:lint options:_rustc_opts_fun_lint' \
187126
'*-Z[Set internal debugging options]:debug options:_rustc_opts_fun_debug' \
188-
'*-C[Set internal Codegen options]:codegen options:_rustc_opts_fun_codegen' \
189127
"$_rustc_opts_switches[@]" \
190-
"$_rustc_opts_vals[@]" \
191-
'::files:_files -g "*.rs"'
128+
'*::files:_files -g "*.rs"'

branches/try2/src/grammar/verify.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ fn parse_antlr_token(s: &str, tokens: &HashMap<String, Token>) -> TokenAndSpan {
211211
let sp = syntax::codemap::Span {
212212
lo: syntax::codemap::BytePos(from_str::<u32>(start).unwrap() - offset),
213213
hi: syntax::codemap::BytePos(from_str::<u32>(end).unwrap() + 1),
214-
expn_id: syntax::codemap::NO_EXPANSION
214+
expn_info: None
215215
};
216216

217217
TokenAndSpan {

branches/try2/src/libcollections/string.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ mod tests {
872872

873873
use {Mutable, MutableSeq};
874874
use str;
875-
use str::{Str, StrSlice, Owned, Slice};
875+
use str::{Str, StrSlice, Owned};
876876
use super::String;
877877
use vec::Vec;
878878

@@ -898,10 +898,10 @@ mod tests {
898898
#[test]
899899
fn test_from_utf8_lossy() {
900900
let xs = b"hello";
901-
assert_eq!(String::from_utf8_lossy(xs), Slice("hello"));
901+
assert_eq!(String::from_utf8_lossy(xs), str::Slice("hello"));
902902

903903
let xs = "ศไทย中华Việt Nam".as_bytes();
904-
assert_eq!(String::from_utf8_lossy(xs), Slice("ศไทย中华Việt Nam"));
904+
assert_eq!(String::from_utf8_lossy(xs), str::Slice("ศไทย中华Việt Nam"));
905905

906906
let xs = b"Hello\xC2 There\xFF Goodbye";
907907
assert_eq!(String::from_utf8_lossy(xs),

branches/try2/src/libcollections/vec.rs

Lines changed: 0 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ use core::default::Default;
2020
use core::fmt;
2121
use core::mem;
2222
use core::num;
23-
use core::ops;
2423
use core::ptr;
2524
use core::raw::Slice as RawSlice;
2625
use core::uint;
@@ -465,47 +464,6 @@ impl<T> Index<uint,T> for Vec<T> {
465464
}
466465
}*/
467466

468-
impl<T> ops::Slice<uint, [T]> for Vec<T> {
469-
#[inline]
470-
fn as_slice_<'a>(&'a self) -> &'a [T] {
471-
self.as_slice()
472-
}
473-
474-
#[inline]
475-
fn slice_from_<'a>(&'a self, start: &uint) -> &'a [T] {
476-
self.as_slice().slice_from_(start)
477-
}
478-
479-
#[inline]
480-
fn slice_to_<'a>(&'a self, end: &uint) -> &'a [T] {
481-
self.as_slice().slice_to_(end)
482-
}
483-
#[inline]
484-
fn slice_<'a>(&'a self, start: &uint, end: &uint) -> &'a [T] {
485-
self.as_slice().slice_(start, end)
486-
}
487-
}
488-
489-
impl<T> ops::SliceMut<uint, [T]> for Vec<T> {
490-
#[inline]
491-
fn as_mut_slice_<'a>(&'a mut self) -> &'a mut [T] {
492-
self.as_mut_slice()
493-
}
494-
495-
#[inline]
496-
fn slice_from_mut_<'a>(&'a mut self, start: &uint) -> &'a mut [T] {
497-
self.as_mut_slice().slice_from_mut_(start)
498-
}
499-
500-
#[inline]
501-
fn slice_to_mut_<'a>(&'a mut self, end: &uint) -> &'a mut [T] {
502-
self.as_mut_slice().slice_to_mut_(end)
503-
}
504-
#[inline]
505-
fn slice_mut_<'a>(&'a mut self, start: &uint, end: &uint) -> &'a mut [T] {
506-
self.as_mut_slice().slice_mut_(start, end)
507-
}
508-
}
509467
impl<T> FromIterator<T> for Vec<T> {
510468
#[inline]
511469
fn from_iter<I:Iterator<T>>(mut iterator: I) -> Vec<T> {
@@ -2369,44 +2327,6 @@ mod tests {
23692327
let _ = vec[3];
23702328
}
23712329

2372-
// NOTE uncomment after snapshot
2373-
/*
2374-
#[test]
2375-
#[should_fail]
2376-
fn test_slice_out_of_bounds_1() {
2377-
let x: Vec<int> = vec![1, 2, 3, 4, 5];
2378-
x[-1..];
2379-
}
2380-
2381-
#[test]
2382-
#[should_fail]
2383-
fn test_slice_out_of_bounds_2() {
2384-
let x: Vec<int> = vec![1, 2, 3, 4, 5];
2385-
x[..6];
2386-
}
2387-
2388-
#[test]
2389-
#[should_fail]
2390-
fn test_slice_out_of_bounds_3() {
2391-
let x: Vec<int> = vec![1, 2, 3, 4, 5];
2392-
x[-1..4];
2393-
}
2394-
2395-
#[test]
2396-
#[should_fail]
2397-
fn test_slice_out_of_bounds_4() {
2398-
let x: Vec<int> = vec![1, 2, 3, 4, 5];
2399-
x[1..6];
2400-
}
2401-
2402-
#[test]
2403-
#[should_fail]
2404-
fn test_slice_out_of_bounds_5() {
2405-
let x: Vec<int> = vec![1, 2, 3, 4, 5];
2406-
x[3..2];
2407-
}
2408-
*/
2409-
24102330
#[test]
24112331
fn test_swap_remove_empty() {
24122332
let mut vec: Vec<uint> = vec!();

0 commit comments

Comments
 (0)