add test for ICE: tcx.resolutions(()) is not supported for local crate -Zunpretty=mir on invalid module path with staged_ap

Fixes https://github.com/rust-lang/rust/issues/108697
This commit is contained in:
Matthias Krüger 2024-04-27 14:20:51 +02:00
parent 6c90ac8d8f
commit c968b8b777
2 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,9 @@
// issue: rust-lang/rust#108697
// ICE: tcx.resolutions(()) is not supported for local crate -Zunpretty=mir
// on invalid module path with staged_api
//@ compile-flags: -Zunpretty=mir
#![feature(staged_api)]
#[path = "lol"]
mod foo;
//~^ ERROR couldn't read

View File

@ -0,0 +1,8 @@
error: couldn't read $DIR/lol: No such file or directory (os error 2)
--> $DIR/staged-api-invalid-path-108697.rs:8:1
|
LL | mod foo;
| ^^^^^^^^
error: aborting due to 1 previous error