-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
while glob imports from an outer/or nested scope do not
mod glob {
pub trait Tr {
fn method(&self) {}
}
impl Tr for () {}
}
// use glob::*; // ok
fn main() {
// use glob::*; // error
trait Tr {} // no method
{
use glob::*; // ok
().method();
}
}
cc @petrochenkov. I want to make sure it's tracked somewhere outside of #144131. Also just really enjoyed learning about this current behavior and wanted to use my test somehow 😁
Originally posted by @lcnr in #144131 (comment)
Metadata
Metadata
Assignees
Labels
A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.