]> git.lizzy.rs Git - rust.git/commit
Suggest valid crate type if invalid
authorPhilipp Hansch <dev@phansch.net>
Thu, 13 Sep 2018 06:42:19 +0000 (08:42 +0200)
committerPhilipp Hansch <dev@phansch.net>
Thu, 13 Sep 2018 19:26:45 +0000 (21:26 +0200)
commit7249a1b1ae075e3a955fda69cdea5161d0eb1aa5
treef02a6cb97c40d94a899d94b7835b6b6cb7cf129d
parentd8af8b66d948ff394db1b3a50e2e4fbe02512239
Suggest valid crate type if invalid

This adds a suggestion to the `invalid_crate_types` lint.

The suggestion is based on the Levenshtein distance to existing crate
types. If no suggestion is found it will show the lint without any
suggestions.
src/librustc/lint/builtin.rs
src/librustc_driver/driver.rs
src/test/ui/invalid/invalid-crate-type.rs
src/test/ui/invalid/invalid-crate-type.stderr