Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//@ edition: 2024

// Regression test for issue https://github.com/rust-lang/rust/issues/147208
// Fix by https://github.com/rust-lang/rust/pull/149681

use foo::bar::E::*;
//~^ ERROR cannot find module or crate `foo` in this scope
use foo::bar::test_use::io as std_io;
//~^ ERROR cannot find module or crate `foo` in this scope
//~| ERROR unresolved import `foo::bar::test_use::io`
fn main() {
Foo(());
//~^ ERROR cannot find function, tuple struct or tuple variant `Foo` in this scope
{
use ::std::io as std_io;
use std_io::stdout;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
error[E0433]: cannot find module or crate `foo` in this scope
--> $DIR/ice-inconsistent-resolution-with-import-separators-issue-147208.rs:6:5
|
LL | use foo::bar::E::*;
| ^^^ use of unresolved module or unlinked crate `foo`
|
= help: you might be missing a crate named `foo`

error[E0433]: cannot find module or crate `foo` in this scope
--> $DIR/ice-inconsistent-resolution-with-import-separators-issue-147208.rs:8:5
|
LL | use foo::bar::test_use::io as std_io;
| ^^^ use of unresolved module or unlinked crate `foo`
|
= help: you might be missing a crate named `foo`

error[E0432]: unresolved import `foo::bar::test_use::io`
--> $DIR/ice-inconsistent-resolution-with-import-separators-issue-147208.rs:8:5
|
LL | use foo::bar::test_use::io as std_io;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0425]: cannot find function, tuple struct or tuple variant `Foo` in this scope
--> $DIR/ice-inconsistent-resolution-with-import-separators-issue-147208.rs:12:5
|
LL | Foo(());
| ^^^ not found in this scope

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0425, E0432, E0433.
For more information about an error, try `rustc --explain E0425`.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//@ edition: 2024

// Regression test for issue https://github.com/rust-lang/rust/issues/147208
// Fix by https://github.com/rust-lang/rust/pull/149681

use bar::foo;
//~^ ERROR unresolved import `bar`
use foo::bar;
fn main() {
mod bar;
//~^ ERROR cannot declare a file module inside a block unless it has a path attribute
use bar::foo;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
error: cannot declare a file module inside a block unless it has a path attribute
--> $DIR/ice-inconsistent-resolution-with-mod-issue-147208.rs:10:5
|
LL | mod bar;
| ^^^^^^^^
|
= note: file modules are usually placed outside of blocks, at the top level of the file

error[E0432]: unresolved import `bar`
--> $DIR/ice-inconsistent-resolution-with-mod-issue-147208.rs:6:5
|
LL | use bar::foo;
| ^^^ use of unresolved module or unlinked crate `bar`
|
= help: you might be missing a crate named `bar`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0432`.
Loading