@@ -5,80 +5,110 @@ local -a _rustc_opts_switches _rustc_opts_lint _rustc_opts_debug
55typeset -A opt_args
66
77_rustc_opts_switches=(
8+ --android-cross-path'[The path to the Android NDK]'
9+ --ar'[Program to use for managing archives instead of the default.]'
810 --bin'[Compile an executable crate (default)]'
911 -c'[Compile and assemble, but do not link]'
1012 --cfg'[Configure the compilation environment]'
13+ --crate-id'[Output the crate id and exit]'
14+ --crate-file-name'[Output the file(s) that would be written if compilation continued and exit]'
15+ --crate-name'[Output the crate name and exit]'
16+ --dep-info'[Output dependency info to <filename> after compiling]'
17+ --dylib'[Compile a dynamic library crate]'
1118 --emit-llvm'[Produce an LLVM bitcode file]'
1219 {-h,--help}'[Display this message]'
1320 -L'[Add a directory to the library search path]'
1421 --lib'[Compile a library crate]'
1522 --linker'[Program to use for linking instead of the default.]'
1623 --link-args'[FLAGS is a space-separated list of flags passed to the linker]'
24+ --llvm-args'[A list of arguments to pass to llvm, comma separated]'
1725 --ls'[List the symbols defined by a library crate]'
26+ --no-analysis'[Parse and expand the output, but run no analysis or produce output]'
27+ --no-rpath'[Disables setting the rpath in libs/exes]'
1828 --no-trans'[Run all passes except translation; no output]'
1929 -O'[Equivalent to --opt-level=2]'
2030 -o'[Write output to <filename>]'
2131 --opt-level'[Optimize with possible levels 0-3]'
2232 --out-dir'[Write output to compiler-chosen filename in <dir>]'
2333 --parse-only'[Parse only; do not compile, assemble, or link]'
34+ --passes'[Comma or space separated list of pass names to use]'
2435 --pretty'[Pretty-print the input instead of compiling]'
36+ --rlib'[Compile a rust library crate as an rlib file]'
2537 -S'[Compile only; do not assemble or link]'
2638 --save-temps'[Write intermediate files (.bc, .opt.bc, .o) in addition to normal output]'
39+ --staticlib'[Compile a static library crate]'
2740 --sysroot'[Override the system root]'
2841 --test'[Build a test harness]'
2942 --target'[Target triple cpu-manufacturer-kernel\[-os\] to compile]'
3043 --target-cpu'[Select target processor (llc -mcpu=help for details)]'
3144 --target-feature'[Target specific attributes (llc -mattr=help for details)]'
32- --android-cross-path'[The path to the Android NDK]'
3345 {-v,--version}'[Print version info and exit]'
3446)
3547_rustc_opts_lint=(
36- 'path-statement[path statements with no effect]'
37- 'missing-trait-doc[detects missing documentation for traits]'
38- 'missing-struct-doc[detects missing documentation for structs]'
48+ 'attribute-usage[detects bad use of attributes]'
3949 'ctypes[proper use of std::libc types in foreign modules]'
40- "unused-mut[detect mut variables which don't need to be mutable]"
41- 'unused-imports[imports that are never used]'
42- 'heap-memory[use of any (~ type or @ type) heap memory]'
43- 'default-methods[allow default methods]'
44- 'unused-variable[detect variables which are not used in any way]'
4550 'dead-assignment[detect assignments that will never be read]'
46- 'unrecognized-lint[unrecognized lint attribute ]'
47- 'type-limits[comparisons made useless by limits of the types involved ]'
48- 'unused-unsafe[unnecessary use of an `unsafe` block ]'
49- 'while-true[suggest using loop { } instead of while(true) { } ]'
50- 'non-camel-case-types[types, variants and traits should have camel case names ]'
51+ 'dead-code[detect piece of code that will never be used ]'
52+ 'default- type-param-usage[prevents explicitly setting a type parameter with a default ]'
53+ 'deprecated[detects use of #\[deprecated\] items ]'
54+ 'experimental[detects use of #\[experimental\] items ]'
55+ 'heap-memory[use of any (~ type or @ type) heap memory ]'
5156 'managed-heap-memory[use of managed (@ type) heap memory]'
52- 'unnecessary-allocation[detects unnecessary allocations that can be eliminated]'
57+ 'missing-doc[detects missing documentation for public members]'
58+ 'non-camel-case-types[types, variants and traits should have camel case names]'
59+ 'non-uppercase-pattern-statics[static constants in match patterns should be all caps]'
60+ 'non-uppercase-statics[static constants should have uppercase identifiers]'
5361 'owned-heap-memory[use of owned (~ type) heap memory]'
62+ 'path-statement[path statements with no effect]'
63+ 'type-limits[comparisons made useless by limits of the types involved]'
64+ 'type-overflow[literal out of range for its type]'
65+ 'unknown-crate-type[unknown crate type found in #\[crate_type\] directive]'
66+ 'unknown-features[unknown features found in crate-level #\[feature\] directives]'
67+ 'unnecessary-allocation[detects unnecessary allocations that can be eliminated]'
68+ 'unnecessary-parens[`if`, `match`, `while` and `return` do not need parentheses]'
69+ 'unnecessary-qualification[detects unnecessarily qualified names]'
70+ 'unnecessary-typecast[detects unnecessary type casts, that can be removed]'
71+ 'unreachable-code[detects unreachable code]'
72+ 'unrecognized-lint[unrecognized lint attribute]'
73+ 'unsafe-block[usage of an `unsafe` block]'
74+ 'unstable[detects use of #\[unstable\] items (incl. items with no stability attribute)]'
75+ 'unused-imports[imports that are never used]'
76+ 'unused-must-use[unused result of an type flagged as #\[must_use\]]'
77+ "unused-mut[detect mut variables which don't need to be mutable]"
78+ 'unused-result[unused result of an expression in a statement]'
79+ 'unused-unsafe[unnecessary use of an `unsafe` block]'
80+ 'unused-variable[detect variables which are not used in any way]'
81+ 'warnings[mass-change the level for lints which produce warnings]'
82+ 'while-true[suggest using `loop { }` instead of `while true { }`]'
5483)
5584
5685_rustc_opts_debug=(
57- 'verbose:in general, enable more debug printouts'
58- 'time-passes:measure time of each rustc pass'
59- 'count-llvm-insns:count where LLVM instrs originate'
60- 'time-llvm-passes:measure time of each LLVM pass'
61- 'trans-stats:gather trans statistics'
62- 'asm-comments:generate comments into the assembly (may change behavior)'
63- 'no-verify:skip LLVM verification'
64- 'trace:emit trace logs'
65- 'coherence:perform coherence checking'
66- 'borrowck-stats:gather borrowck statistics'
67- "borrowck-note-pure:note where purity is req'd"
68- "borrowck-note-loan:note where loans are req'd"
69- 'no-landing-pads:omit landing pads for unwinding'
70- 'debug-llvm:enable debug output from LLVM'
71- 'count-type-sizes:count the sizes of aggregate types'
72- 'meta-stats:gather metadata statistics'
73- 'no-opt:do not optimize, even if -O is passed'
74- 'print-link-args:Print the arguments passed to the linker'
75- 'gc:Garbage collect shared data (experimental)'
76- 'jit:Execute using JIT (experimental)'
77- 'extra-debug-info:Extra debugging info (experimental)'
78- 'debug-info:Produce debug info (experimental)'
79- 'static:Use or produce static libraries or binaries (experimental)'
80- 'no-debug-borrows:do not show where borrow checks fail'
81- 'lint-llvm:Run the LLVM lint pass on the pre-optimization IR'
86+ 'asm-comments[generate comments into the assembly (may change behavior)]'
87+ 'borrowck-stats[gather borrowck statistics]'
88+ 'count-llvm-insns[count where LLVM instrs originate]'
89+ 'count-type-sizes[count the sizes of aggregate types]'
90+ 'debug-info[Produce debug info (experimental)]'
91+ 'debug-llvm[enable debug output from LLVM]'
92+ 'extra-debug-info[Extra debugging info (experimental)]'
93+ 'gc[Garbage collect shared data (experimental)]'
94+ 'gen-crate-map[Force generation of a toplevel crate map]'
95+ 'lto[Perform LLVM link-time optimizations]'
96+ 'meta-stats[gather metadata statistics]'
97+ "no-integrated-as[Use external assembler rather than LLVM's integrated one]"
98+ 'no-landing-pads[omit landing pads for unwinding]'
99+ 'no-opt[do not optimize, even if -O is passed]'
100+ "no-prepopulate-passes[Don't pre-populate the pass managers with a list of passes, only use the passes from --passes]"
101+ "no-vectorize-loops[Don't run the loop vectorization optimization passes]"
102+ "no-vectorize-slp[Don't run LLVM's SLP vectorization passes]"
103+ 'no-verify[skip LLVM verification]'
104+ 'prefer-dynamic[Prefer dynamic linking to static linking]'
105+ 'print-link-args[Print the arguments passed to the linker]'
106+ 'print-llvm-passes[Prints the llvm optimization passes being run]'
107+ 'soft-float[Generate software floating point library calls]'
108+ 'time-llvm-passes[measure time of each LLVM pass]'
109+ 'time-passes[measure time of each rustc pass]'
110+ 'trans-stats[gather trans statistics]'
111+ 'verbose[in general, enable more debug printouts]'
82112)
83113
84114_rustc_opts_fun_lint(){
0 commit comments