Test for #14082 doesn't test what it should
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Please, take this with a grain of salt as I might have misunderstood what #14082 is about.
The test added for this should check that a glob import is correctly shadowed by a non-glob import of a reexport from inside a non-pub module. Essentially:
// tests/ui/issues/issue-14082.rs
//@ check-pass
#![allow(unused_imports, dead_code)]
use foo::Foo;
mod foo {
pub use d::*; // This imports `d::Foo`.
pub use m::Foo; // But this imports `m::Foo` explicitly, which shadows `d::Foo`.
}
mod m {
pub struct Foo;
}
mod d {
pub struct Foo;
}
fn main() {}
However this was changed on this bulk refactor which removed the d::* import.
Let me know if my understanding is correct. I'll submit a PR with a fix if that's the case.
Thanks :)
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
Start with tests/ui/issues/issue-14082.rs and compare it with the intended scenario described here. Check that the test includes a glob reexport from d and an explicit Foo reexport from m inside foo, then confirm the test still passes and exercises the shadowing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100