Unnamed repository; edit this file 'description' to name the repository.
Rollup merge of #158300 - evavh:crate-type-suggestions, r=JonathanBrouwer
Improve unknown crate_type diagnostic suggestions
I have improved the suggestions given in the unknown crate_type diagnostic.
Before (no suggestion):
```
error: invalid `crate_type` value
--> bad_error.rs:1:17
|
1 | #![crate_type = "binary"]
| ^^^^^^^^
|
= note: `#[deny(unknown_crate_types)]` on by default
```
After:
```
error: invalid `crate_type` value
--> bad_error.rs:1:17
|
1 | #![crate_type = "binary"]
| ^^^^^^^^ help: did you mean: `"bin"`
|
= note: `#[deny(unknown_crate_types)]` on by default
```
By increasing the allowed edit distance for the matching, as well as allowing substring matches, this now also works for mistakes like `dynamiclib`, where it will suggest `dylib`, and `cdylibrary` where it suggests `cdylib`.
r? @JonathanBrouwer