-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-editionDiagnostics: An error or lint that should account for edition differences.Diagnostics: An error or lint that should account for edition differences.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.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
Given the following code: [playground]
mod m {
#[macro_export]
macro_rules! nu {
{} => {};
}
pub use self::nu;
}
The current output is:
error[[E0432]](https://doc.rust-lang.org/nightly/error-index.html#E0432): unresolved import `self::nu`
--> src/lib.rs:7:13
|
7 | pub use self::nu;
| ^^^^^^^^ no `nu` in `m`
|
= note: this could be because a macro annotated with `#[macro_export]` will be exported at the root of the crate instead of the module where it is defined
help: a macro with this name exists at the root of the crate
|
7 | pub use ::nu;
| ~~~~
For more information about this error, try `rustc --explain E0432`.
This is using the edition2015 syntax to import from the crate root, rather than the edition2018+ required crate::nu
.
Related: #99695
@rustbot label +D-edition +D-invalid-suggestion
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-editionDiagnostics: An error or lint that should account for edition differences.Diagnostics: An error or lint that should account for edition differences.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.Diagnostics: A structured suggestion resulting in incorrect code.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.