Unresolved import with external module in name resolution 2.0
Open
Nobody has claimed this yet.
bug
name resolution
- Dominant language
- C++
- Stars
- 2.9k
- Forks
- 231
- Avg merge
- 19h 55m
- Merged PRs (30d)
- 67
Description
with the following project structure:
test/
- lib.rs
- foo.rs
and the following file content
// test/lib.rs
mod foo;
use foo::Foo;
// test/foo.rs
pub struct Foo;
we get the following error:
~/G/r/gccrs (master|✚1) [1] $ build/gcc/crab1 test/lib.rs -frust-name-resolution-2.0
test/lib.rs:3:10: error: unresolved import ‘foo::Foo’ [E0433]
3 | use foo::Foo;
| ^~~
name resolution 1.0 and rustc do not emit any errors
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with test/lib.rs and test/foo.rs using build/gcc/crab1 test/lib.rs -frust-name-resolution-2.0, then compare the result with name resolution 1.0 and rustc. The work is done when the 2.0 resolver accepts the external module import without reporting E0433.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100