forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#121194 - beetrees:rustc-raw-args, r=petrochenkov Refactor pre-getopts command line argument handling Rebased version of rust-lang#111658. I've also fixed the Windows CI failure (although I don't have access to Windows to test it myself).
- Loading branch information
Showing
44 changed files
with
303 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
tests/rustdoc-ui/argfile/commandline-argfile-badutf8-windows.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Check to see if we can get parameters from an @argsfile file | ||
// | ||
// Path replacement in .stderr files (i.e. `$DIR`) doesn't handle mixed path | ||
// separators. This test uses backslash as the path separator for the command | ||
// line arguments and is only run on windows. | ||
// | ||
//@ only-windows | ||
//@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-badutf8.args | ||
|
||
#[cfg(not(cmdline_set))] | ||
compile_error!("cmdline_set not set"); | ||
|
||
#[cfg(not(unbroken))] | ||
compile_error!("unbroken not set"); | ||
|
||
fn main() { | ||
} |
2 changes: 2 additions & 0 deletions
2
tests/rustdoc-ui/argfile/commandline-argfile-badutf8-windows.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
error: failed to load argument file: UTF-8 error in $DIR/commandline-argfile-badutf8.args | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Check to see if we can get parameters from an @argsfile file | ||
// | ||
// Path replacement in .stderr files (i.e. `$DIR`) doesn't handle mixed path | ||
// separators. We have a duplicated version of this test that uses backslash as | ||
// the path separator for the command line arguments that is only run on | ||
// windows. | ||
// | ||
//@ ignore-windows | ||
//@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-badutf8.args | ||
|
||
#[cfg(not(cmdline_set))] | ||
compile_error!("cmdline_set not set"); | ||
|
||
#[cfg(not(unbroken))] | ||
compile_error!("unbroken not set"); | ||
|
||
fn main() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
error: failed to load argument file: UTF-8 error in $DIR/commandline-argfile-badutf8.args | ||
|
7 changes: 6 additions & 1 deletion
7
tests/ui/commandline-argfile-missing.rs → ...le/commandline-argfile-missing-windows.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
tests/rustdoc-ui/argfile/commandline-argfile-missing-windows.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
error: failed to load argument file: IO error: $DIR/commandline-argfile-missing.args: $FILE_MISSING (os error $ERR) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Check to see if we can get parameters from an @argsfile file | ||
// | ||
// Path replacement in .stderr files (i.e. `$DIR`) doesn't handle mixed path | ||
// separators. We have a duplicated version of this test that uses backslash as | ||
// the path separator for the command line arguments that is only run on | ||
// windows. | ||
// | ||
//@ ignore-windows | ||
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" | ||
//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " | ||
//@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args | ||
|
||
#[cfg(not(cmdline_set))] | ||
compile_error!("cmdline_set not set"); | ||
|
||
#[cfg(not(unbroken))] | ||
compile_error!("unbroken not set"); | ||
|
||
fn main() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
error: failed to load argument file: IO error: $DIR/commandline-argfile-missing.args: $FILE_MISSING (os error $ERR) | ||
|
20 changes: 20 additions & 0 deletions
20
tests/rustdoc-ui/argfile/commandline-argfile-multiple-windows.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Check to see if we can get parameters from an @argsfile file | ||
// | ||
// Path replacement in .stderr files (i.e. `$DIR`) doesn't handle mixed path | ||
// separators. This test uses backslash as the path separator for the command | ||
// line arguments and is only run on windows. | ||
// | ||
//@ only-windows | ||
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" | ||
//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " | ||
//@ normalize-stderr-test: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING " | ||
//@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args @{{src-base}}\argfile\commandline-argfile-badutf8.args @{{src-base}}\argfile\commandline-argfile-missing2.args | ||
|
||
#[cfg(not(cmdline_set))] | ||
compile_error!("cmdline_set not set"); | ||
|
||
#[cfg(not(unbroken))] | ||
compile_error!("unbroken not set"); | ||
|
||
fn main() { | ||
} |
6 changes: 6 additions & 0 deletions
6
tests/rustdoc-ui/argfile/commandline-argfile-multiple-windows.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
error: failed to load argument file: IO error: $DIR/commandline-argfile-missing.args: $FILE_MISSING (os error $ERR) | ||
|
||
error: failed to load argument file: UTF-8 error in $DIR/commandline-argfile-badutf8.args | ||
|
||
error: failed to load argument file: IO error: $DIR/commandline-argfile-missing2.args: $FILE_MISSING (os error $ERR) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Check to see if we can get parameters from an @argsfile file | ||
// | ||
// Path replacement in .stderr files (i.e. `$DIR`) doesn't handle mixed path | ||
// separators. We have a duplicated version of this test that uses backslash as | ||
// the path separator for the command line arguments that is only run on | ||
// windows. | ||
// | ||
//@ ignore-windows | ||
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR" | ||
//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING " | ||
//@ normalize-stderr-test: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING " | ||
//@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args @{{src-base}}/argfile/commandline-argfile-badutf8.args @{{src-base}}/argfile/commandline-argfile-missing2.args | ||
|
||
#[cfg(not(cmdline_set))] | ||
compile_error!("cmdline_set not set"); | ||
|
||
#[cfg(not(unbroken))] | ||
compile_error!("unbroken not set"); | ||
|
||
fn main() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
error: failed to load argument file: IO error: $DIR/commandline-argfile-missing.args: $FILE_MISSING (os error $ERR) | ||
|
||
error: failed to load argument file: UTF-8 error in $DIR/commandline-argfile-badutf8.args | ||
|
||
error: failed to load argument file: IO error: $DIR/commandline-argfile-missing2.args: $FILE_MISSING (os error $ERR) | ||
|
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
tests/rustdoc-ui/commandline-argfile.rs → ...rustdoc-ui/argfile/commandline-argfile.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Check to see if we can get parameters from an @argsfile file | ||
// | ||
// Path replacement in .stderr files (i.e. `$DIR`) doesn't handle mixed path | ||
// separators. This test uses backslash as the path separator for the command | ||
// line arguments and is only run on windows. | ||
// | ||
//@ only-windows | ||
//@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-badutf8.args | ||
|
||
#[cfg(not(cmdline_set))] | ||
compile_error!("cmdline_set not set"); | ||
|
||
#[cfg(not(unbroken))] | ||
compile_error!("unbroken not set"); | ||
|
||
fn main() { | ||
} |
Oops, something went wrong.