Skip to content

Commit 9ddf572

Browse files
committed
add non-regression run-make test for issues 125474, 125484, and 125646
1 parent 0a4176a commit 9ddf572

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// Empty
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
pub type Foo = something::same::Thing;
2+
3+
mod something {
4+
pub mod same {
5+
pub struct Thing;
6+
}
7+
}
8+
9+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Non-regression test for issues #125474, #125484, #125646, with the repro taken from #125484. Some
2+
// queries use "used dependencies" while others use "speculatively loaded dependencies", and an
3+
// indexing ICE appeared in some cases when these were unexpectedly used in the same context.
4+
5+
// FIXME: this should probably be a UI test instead of a run-make test, but I *cannot* find a way to
6+
// make compiletest annotations reproduce the ICE with the minimizations from issues #125474 and
7+
// #125484.
8+
9+
use run_make_support::{rustc, tmp_dir};
10+
11+
fn main() {
12+
// The dependency is not itself significant, apart from sharing a name with one of main's
13+
// modules.
14+
rustc().crate_name("same").crate_type("rlib").input("dependency.rs").run();
15+
16+
// Here, an ICE would happen when building the linker command.
17+
rustc().input("main.rs").extern_("same", tmp_dir().join("libsame.rlib")).run();
18+
}

0 commit comments

Comments
 (0)