File tree 3 files changed +32
-20
lines changed
tests/run-make/incr-prev-body-beyond-eof
3 files changed +32
-20
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,6 @@ run-make/inaccessible-temp-dir/Makefile
79
79
run-make/include_bytes_deps/Makefile
80
80
run-make/incr-add-rust-src-component/Makefile
81
81
run-make/incr-foreign-head-span/Makefile
82
- run-make/incr-prev-body-beyond-eof/Makefile
83
82
run-make/incremental-debugger-visualizer/Makefile
84
83
run-make/incremental-session-fail/Makefile
85
84
run-make/inline-always-many-cgu/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // After modifying the span of a function, if the length of
2
+ // the span remained the same but the end line number became different,
3
+ // this would cause an internal compiler error (ICE), fixed in #76256.
4
+
5
+ // This test compiles main.rs twice, first with end line 16 and
6
+ // then with end line 12. If compilation is successful, the end line
7
+ // was hashed by rustc in addition to the span length, and the fix still
8
+ // works.
9
+
10
+ // FIXME: Ignore flags temporarily disabled for the test.
11
+ // ignore-none
12
+ // ignore-nvptx64-nvidia-cuda
13
+
14
+ use run_make_support:: { rustc, target, tmp_dir} ;
15
+ use std:: fs;
16
+
17
+ fn main ( ) {
18
+ fs:: create_dir ( tmp_dir ( ) . join ( "src" ) ) ;
19
+ fs:: create_dir ( tmp_dir ( ) . join ( "incr" ) ) ;
20
+ fs:: copy ( "a.rs" , tmp_dir ( ) . join ( "main.rs" ) ) ;
21
+ rustc ( )
22
+ . incremental ( tmp_dir ( ) . join ( "incr" ) )
23
+ . input ( tmp_dir ( ) . join ( "src/main.rs" ) )
24
+ . target ( target ( ) )
25
+ . run ( ) ;
26
+ fs:: copy ( "b.rs" , tmp_dir ( ) . join ( "main.rs" ) ) ;
27
+ rustc ( )
28
+ . incremental ( tmp_dir ( ) . join ( "incr" ) )
29
+ . input ( tmp_dir ( ) . join ( "src/main.rs" ) )
30
+ . target ( target ( ) )
31
+ . run ( ) ;
32
+ }
You can’t perform that action at this time.
0 commit comments