Skip to content

Commit 5ad7286

Browse files
committed
auto merge of #15589 : Denommus/rust/master, r=alexcrichton
I have noticed some errors and some absences that I considered essential to the usability of rustc in zsh, so I included them and updated some of the man page.
2 parents 1e40115 + 175d215 commit 5ad7286

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

man/rustc.1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ This program is a compiler for the Rust language, available at
1111

1212
.SH OPTIONS
1313

14+
.TP
15+
\fB\-\-crate-name NAME\fR
16+
Specify the name of the crate being built
1417
.TP
1518
\fB\-\-crate-type=[bin|lib|dylib|rlib|staticlib]\fR
1619
Configure the flavor of rust crate that is generated (default `bin`)

src/etc/zsh/_rust

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ _rustc_opts_switches=(
99
-c'[Compile and assemble, but do not link]'
1010
--cfg'[Configure the compilation environment]'
1111
--crate-id'[Output the crate id and exit]'
12-
--crate-file-name'[Output the file(s) that would be written if compilation continued and exit]'
13-
--crate-name'[Output the crate name and exit]'
14-
--dep-info'[Output dependency info to <filename> after compiling]'
12+
--crate-file-name'[deprecated in favor of --print-file-name]'
13+
--crate-name'[Specify the name of the crate being built]'
1514
--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+
-g'[Equivalent to --debuginfo=2]'
1618
{-h,--help}'[Display this message]'
1719
-L'[Add a directory to the library search path]'
1820
--linker'[Program to use for linking instead of the default.]'
@@ -29,6 +31,8 @@ _rustc_opts_switches=(
2931
--parse-only'[Parse only; do not compile, assemble, or link]'
3032
--passes'[Comma or space separated list of pass names to use]'
3133
--pretty'[Pretty-print the input instead of compiling]'
34+
--print-crate-name'[Output the crate name and exit]'
35+
--print-file-name'[Output the file(s) that would be written if compilation continued and exit]'
3236
--save-temps'[Write intermediate files (.bc, .opt.bc, .o) in addition to normal output]'
3337
--sysroot'[Override the system root]'
3438
--test'[Build a test harness]'

0 commit comments

Comments
 (0)