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
2 changes: 1 addition & 1 deletion compiler/rustc_resolve/src/ident.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1366,7 +1366,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
&single_import.parent_scope,
None,
ignore_decl,
ignore_import,
None,
) {
Err(Determined) => continue,
Ok(binding)
Expand Down
17 changes: 17 additions & 0 deletions tests/ui/imports/inconsistent-resolution-153842.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
mod a {
pub use crate::s::Trait as s;
//~^ ERROR cannot determine resolution for the import
//~| ERROR cannot determine resolution for the import
//~| ERROR unresolved imports `crate::s::Trait`, `a::s`
}

mod b {
pub mod s {
pub trait Trait {}
}
}

use a::s;
use b::*;

fn main() {}
26 changes: 26 additions & 0 deletions tests/ui/imports/inconsistent-resolution-153842.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
error: cannot determine resolution for the import
--> $DIR/inconsistent-resolution-153842.rs:2:13
|
LL | pub use crate::s::Trait as s;
| ^^^^^^^^^^^^^^^^^^^^

error: cannot determine resolution for the import
--> $DIR/inconsistent-resolution-153842.rs:2:13
|
LL | pub use crate::s::Trait as s;
| ^^^^^^^^^^^^^^^^^^^^
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0432]: unresolved imports `crate::s::Trait`, `a::s`
--> $DIR/inconsistent-resolution-153842.rs:2:13
|
LL | pub use crate::s::Trait as s;
| ^^^^^^^^^^^^^^^^^^^^
...
LL | use a::s;
| ^^^^

error: aborting due to 3 previous errors

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