about summary refs log tree commit diff
path: root/tests/ui/imports/import-from-missing-star-2.rs
blob: 9dad2d4886b8b8235352dd3be07f62af11595af5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//@revisions: edition2015 edition2024
//@[edition2015] edition:2015
//@[edition2024] edition:2024
mod foo {
//[edition2015]~^ HELP you might be missing a crate named `spam`, add it to your project and import it in your code
    use spam::*; //~ ERROR unresolved import `spam` [E0432]
    //[edition2024]~^ HELP you might be missing a crate named `spam`
}

fn main() {
    // Expect this to pass because the compiler knows there's a failed `*` import in `foo` that
    // might have caused it.
    foo::bar();
    // FIXME: these two should *fail* because they can't be fixed by fixing the glob import in `foo`
    ham(); // should error but doesn't
    eggs(); // should error but doesn't
}