From 6240d4518930bdf20b44109e55d047eec3221c9a Mon Sep 17 00:00:00 2001 From: dekrain Date: Mon, 13 Mar 2023 18:28:59 +0100 Subject: Fix ICE caused by at-expanding argument 0 instead of removing it early --- compiler/rustc_driver_impl/src/args.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/rustc_driver_impl/src/args.rs') 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, 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 { let mut args = Vec::new(); for arg in at_args { -- cgit 1.4.1-3-g733a5