-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.P-mediumMedium priorityMedium priorityT-langRelevant to the language teamRelevant to the language team
Description
Consider this layout
// main.rs
mod foo;
fn main() {}
// foo.rs
mod bar;
// bar.rs
// empty
It generates cannot declare a new module at this location
error for mod bar;
, which is good.
However, If I explicitly specify #[path = ]
for mod foo;
it compiles:
// main.rs
#[path = "foo.rs"]
mod foo;
fn main() {}
// foo.rs
mod bar;
// bar.rs
// empty
I don't know if this is expected behavior or not, but it looks suspicious to me .
Metadata
Metadata
Assignees
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.P-mediumMedium priorityMedium priorityT-langRelevant to the language teamRelevant to the language team