2024-05-28 14:41:51 -05:00
|
|
|
// After modifying the span of a function, if the length of
|
|
|
|
// the span remained the same but the end line number became different,
|
|
|
|
// this would cause an internal compiler error (ICE), fixed in #76256.
|
|
|
|
|
|
|
|
// This test compiles main.rs twice, first with end line 16 and
|
|
|
|
// then with end line 12. If compilation is successful, the end line
|
|
|
|
// was hashed by rustc in addition to the span length, and the fix still
|
|
|
|
// works.
|
|
|
|
|
2024-05-28 14:54:09 -05:00
|
|
|
//@ ignore-none
|
|
|
|
// reason: no-std is not supported
|
2024-05-28 14:41:51 -05:00
|
|
|
|
2024-05-28 14:54:09 -05:00
|
|
|
//@ ignore-nvptx64-nvidia-cuda
|
|
|
|
// FIXME: can't find crate for `std`
|
|
|
|
|
2024-06-06 14:34:34 -05:00
|
|
|
use run_make_support::{rfs, rustc};
|
2024-05-28 14:41:51 -05:00
|
|
|
|
|
|
|
fn main() {
|
2024-07-17 07:42:06 -05:00
|
|
|
rfs::create_dir("src");
|
|
|
|
rfs::create_dir("incr");
|
|
|
|
rfs::copy("a.rs", "src/main.rs");
|
2024-06-06 14:34:34 -05:00
|
|
|
rustc().incremental("incr").input("src/main.rs").run();
|
2024-07-17 07:42:06 -05:00
|
|
|
rfs::copy("b.rs", "src/main.rs");
|
2024-06-06 14:34:34 -05:00
|
|
|
rustc().incremental("incr").input("src/main.rs").run();
|
2024-05-28 14:41:51 -05:00
|
|
|
}
|