Skip to content

Commit

Permalink
add test for ICE: tcx.resolutions(()) is not supported for local crat…
Browse files Browse the repository at this point in the history
…e -Zunpretty=mir on invalid module path with staged_ap

Fixes rust-lang#108697
  • Loading branch information
matthiaskrgr committed Apr 27, 2024
1 parent 261823e commit 24829ee
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/ui/unpretty/staged-api-invalid-path-108697.rs
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions tests/ui/unpretty/staged-api-invalid-path-108697.stderr
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 24829ee

Please sign in to comment.