File tree 6 files changed +15
-20
lines changed
tests/run-make/overwrite-input
6 files changed +15
-20
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,6 @@ run-make/optimization-remarks-dir-pgo/Makefile
119
119
run-make/optimization-remarks-dir/Makefile
120
120
run-make/output-type-permutations/Makefile
121
121
run-make/override-aliased-flags/Makefile
122
- run-make/overwrite-input/Makefile
123
122
run-make/panic-abort-eh_frame/Makefile
124
123
run-make/pass-linker-flags-flavor/Makefile
125
124
run-make/pass-linker-flags-from-dep/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- warning: ignoring --out-dir flag due to -o flag
2
-
3
1
error: the input file "main.rs" would be overwritten by the generated executable
4
2
5
- error: aborting due to 1 previous error; 1 warning emitted
3
+ error: aborting due to 1 previous error
6
4
Original file line number Diff line number Diff line change 1
- warning: ignoring --out-dir flag due to -o flag
2
-
3
1
error: the generated executable for the input file "main.rs" conflicts with the existing directory "."
4
2
5
- error: aborting due to 1 previous error; 1 warning emitted
3
+ error: aborting due to 1 previous error
6
4
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // An attempt to set the output `-o` into a directory or a file we cannot write into should indeed
2
+ // be an error; but not an ICE (Internal Compiler Error). This test attempts both and checks
3
+ // that the standard error matches what is expected.
4
+ // See https://github.com/rust-lang/rust/issues/66530
5
+
6
+ use run_make_support:: { diff, rustc} ;
7
+
8
+ fn main ( ) {
9
+ let file_out = rustc ( ) . input ( "main.rs" ) . output ( "main.rs" ) . run_fail ( ) . stderr_utf8 ( ) ;
10
+ let folder_out = rustc ( ) . input ( "main.rs" ) . output ( "." ) . run_fail ( ) . stderr_utf8 ( ) ;
11
+ diff ( ) . expected_file ( "file.stderr" ) . actual_text ( "actual-file-stderr" , file_out) . run ( ) ;
12
+ diff ( ) . expected_file ( "folder.stderr" ) . actual_text ( "actual-folder-stderr" , folder_out) . run ( ) ;
13
+ }
You can’t perform that action at this time.
0 commit comments