diff options
| author | dekrain <dawidkrainski8@gmail.com> | 2023-03-13 18:28:59 +0100 |
|---|---|---|
| committer | dekrain <dawidkrainski8@gmail.com> | 2023-05-27 18:00:43 +0200 |
| commit | 6240d4518930bdf20b44109e55d047eec3221c9a (patch) | |
| tree | fda03b403613f73d05545a85960f788465916f7c /compiler/rustc_driver_impl/src/args.rs | |
| parent | f1b1ed7e18f1fbe5226a96626827c625985f8285 (diff) | |
| download | rust-6240d4518930bdf20b44109e55d047eec3221c9a.tar.gz rust-6240d4518930bdf20b44109e55d047eec3221c9a.zip | |
Fix ICE caused by at-expanding argument 0 instead of removing it early
Diffstat (limited to 'compiler/rustc_driver_impl/src/args.rs')
| -rw-r--r-- | compiler/rustc_driver_impl/src/args.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_driver_impl/src/args.rs b/compiler/rustc_driver_impl/src/args.rs index 42c97cc6a9d..5ddacc38863 100644 --- a/compiler/rustc_driver_impl/src/args.rs +++ b/compiler/rustc_driver_impl/src/args.rs @@ -18,6 +18,9 @@ fn arg_expand(arg: String) -> Result<Vec<String>, Error> { } } +/// **Note:** This function doesn't interpret argument 0 in any special way. +/// If this function is intended to be used with command line arguments, +/// `argv[0]` must be removed prior to calling it manually. pub fn arg_expand_all(at_args: &[String]) -> Vec<String> { let mut args = Vec::new(); for arg in at_args { |
