Skip to content

Enforce crate naming rules of rustc #2708

Closed
@sanmai-NL

Description

@sanmai-NL

Actual behavior

Creating a new crate:

cargo new --bin 'UPPERcase_name'

No issue.

Compiling it:

 cargo build
warning: crate `UPPERcase_name` should have a snake case name such as `uppercase_name`, #[warn(non_snake_case)] on by default

Expected behavior

Cargo should only create crates with names that raise rustc warnings if forced.

Meta

  rustc --version --verbose
rustc 1.8.0
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.8.0
  cargo --version
cargo 0.10.0 (10ddd7d 2016-04-08)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-newS-needs-mentorStatus: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions