You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/etc/zsh/_rust
+131-68
Original file line number
Diff line number
Diff line change
@@ -4,109 +4,166 @@ local -a _rustc_opts_switches _rustc_opts_lint _rustc_opts_debug
4
4
5
5
typeset -A opt_args
6
6
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
+
7
61
_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]'
17
62
-g'[Equivalent to --debuginfo=2]'
18
63
{-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]'
24
64
--no-analysis'[Parse and expand the output, but run no analysis or produce output]'
25
-
--no-rpath'[Disables setting the rpath in libs/exes]'
26
65
--no-trans'[Run all passes except translation; no output]'
27
66
-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>]'
31
67
--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]'
34
68
--print-crate-name'[Output the crate name and exit]'
35
69
--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]'
38
70
--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]'
44
71
)
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
+
45
97
_rustc_opts_lint=(
46
-
'attribute-usage[detects bad use of attributes]'
47
-
'ctypes[proper use of libc types in foreign modules]'
48
-
'dead-assignment[detect assignments that will never be read]'
49
-
'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]'
51
-
'deprecated[detects use of #\[deprecated\] items]'
98
+
'help[Show a list of all lints]'
52
99
'experimental[detects use of #\[experimental\] items]'
53
-
'heap-memory[use of any (~ type or @ type) heap memory]'
100
+
'heap-memory[use of any (Box type or @ type) heap memory]'
54
101
'managed-heap-memory[use of managed (@ type) heap memory]'
55
102
'missing-doc[detects missing documentation for public members]'
56
-
'non-camel-case-types[types, variants and traits should have camel case names]'
57
-
'non-uppercase-pattern-statics[static constants in match patterns should be all caps]'
58
103
'non-uppercase-statics[static constants should have uppercase identifiers]'
59
104
'owned-heap-memory[use of owned (~ type) heap memory]'
0 commit comments