-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
15 additions
and
20 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 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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
warning: ignoring --out-dir flag due to -o flag | ||
|
||
error: the input file "main.rs" would be overwritten by the generated executable | ||
|
||
error: aborting due to 1 previous error; 1 warning emitted | ||
error: aborting due to 1 previous error | ||
|
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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
warning: ignoring --out-dir flag due to -o flag | ||
|
||
error: the generated executable for the input file "main.rs" conflicts with the existing directory "." | ||
|
||
error: aborting due to 1 previous error; 1 warning emitted | ||
error: aborting due to 1 previous error | ||
|
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,13 @@ | ||
// An attempt to set the output `-o` into a directory or a file we cannot write into should indeed | ||
// be an error; but not an ICE (Internal Compiler Error). This test attempts both and checks | ||
// that the standard error matches what is expected. | ||
// See https://github.com/rust-lang/rust/issues/66530 | ||
|
||
use run_make_support::{diff, rustc}; | ||
|
||
fn main() { | ||
let file_out = rustc().input("main.rs").output("main.rs").run_fail().stderr_utf8(); | ||
let folder_out = rustc().input("main.rs").output(".").run_fail().stderr_utf8(); | ||
diff().expected_file("file.stderr").actual_text("actual-file-stderr", file_out).run(); | ||
diff().expected_file("folder.stderr").actual_text("actual-folder-stderr", folder_out).run(); | ||
} |