Better error for extern crate accidental-hyphen
#48437
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
AIUI currently the standard is for crate names to be hyphenated, but the module name (not sure on the correct terminology) must be underscored.
For example you add
bit-vec
to theCargo.toml
, butextern crate bit_vec;
tosrc/lib.rs
.So instead of this error, it would be great if the compiler could suggest
extern crate bit_vec;
.Came from a discussion with @nrc on twitter: https://twitter.com/gibfahn/status/966755092383739904
I couldn't find an existing issue for this, sorry if it's a duplicate.
The text was updated successfully, but these errors were encountered: