mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 20:45:45 +03:00
Merge pull request #629 from sfackler/usage
Use argv[0] for usage output
This commit is contained in:
+1
-1
@@ -164,7 +164,7 @@ fn main() {
|
||||
fn print_usage(opts: &Options, reason: &str) {
|
||||
let reason = format!("{}\nusage: {} [options] <file>...",
|
||||
reason,
|
||||
env::current_exe().unwrap().display());
|
||||
env::args_os().next().unwrap().to_string_lossy());
|
||||
println!("{}", opts.usage(&reason));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user