diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2011-12-30 15:26:49 -0800 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2011-12-30 15:26:49 -0800 |
| commit | bfc9a499c25919b75a87c05beb60e2c76688e7cf (patch) | |
| tree | 7a23dd2d543c0e7b770a83d0dde2793c8bd4fb7f /src/comp/driver | |
| parent | 90ae3e3168a5d4afb9a81c19b8ad7cc737dac0d8 (diff) | |
| download | rust-bfc9a499c25919b75a87c05beb60e2c76688e7cf.tar.gz rust-bfc9a499c25919b75a87c05beb60e2c76688e7cf.zip | |
Print usage messages to rustc and rustdoc when invoked with no args. Close #1394.
Diffstat (limited to 'src/comp/driver')
| -rw-r--r-- | src/comp/driver/rustc.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/comp/driver/rustc.rs b/src/comp/driver/rustc.rs index aad129b6ac8..7f0ad7da3bb 100644 --- a/src/comp/driver/rustc.rs +++ b/src/comp/driver/rustc.rs @@ -61,6 +61,9 @@ options: fn main(args: [str]) { let args = args, binary = vec::shift(args); + + if vec::len(args) == 0u { usage(binary); ret; } + let match = alt getopts::getopts(args, opts()) { ok(m) { m } |
