-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Closed
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.P-highHigh priorityHigh priorityT-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.T-langRelevant to the language teamRelevant to the language teamregression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.
Description
The first import in the following example should fail (play):
pub mod x {
pub use crate::x::super::{self as crate1}; // OK but should ERROR
pub use crate::x::self::super::{self as crate2}; //~ ERROR `self` in paths can only be used in start position
pub fn foo() {}
}
fn main() {
x::crate1::x::foo();
x::crate2::x::foo();
crate::x::super::x::foo(); //~ ERROR `super` in paths can only be used in start position
crate::x::self::super::x::foo(); //~ ERROR `self` in paths can only be used in start position
}Version
Build using the Nightly version: 1.95.0-nightly
(2026-02-21 5fb2ff8)
Reactions are currently unavailable
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.P-highHigh priorityHigh priorityT-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.T-langRelevant to the language teamRelevant to the language teamregression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.Performance or correctness regression from stable to nightly.