Skip to content

Is there a reason why context-sensitive identifiers are not banned for project name? #16115

@HeWhoHeWho

Description

@HeWhoHeWho

cargo new allows these identifiers to be project name, but likely to cause confusion.

Current banned keywords for project name (excluding weak keywords): [1]; [2]

Context-sensitive identifiers by category:

  1. Project structure
    main, lib, init, config, setup, default, testing, etc.

  2. Tooling
    cargo, rustc, build, target, deps, doc, bin, src, examples, tests, benches, out, etc.

  3. Compiler
    std, core, alloc, proc_macro, compiler_builtins, panic_abort, panic_unwind, etc.

edit: Quick checked source code found 2 keywords missing from the current restricted name list: gen and union.

Appreciate enlightenment on this. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions