Skip to content

path attribute is silently accepted and ignored for inline mod items. #13156

Closed
@pnkfelix

Description

@pnkfelix

Consider the following program p.rs:

#[path="q.rs"] mod q {
    pub fn q_main() { println!("Hello World"); }
}

fn main() { q::q_main() }

I don't know if this is considered a bug or a feature, but we should probably emit a warning when we encounter that useless path attribute attached to q above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions