You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Invalid crate type should helpfully suggest valid crate type #53958
Compiling playground v0.0.1 (file:///playground)
error: invalid `crate_type` value
--> src/lib.rs:1:1
|
1 | #![crate_type = "proc_macro"]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[deny(unknown_crate_types)] on by default
error: aborting due to previous error
error: Could not compile `playground`.
Expected:
Compiling playground v0.0.1 (file:///playground)
error: invalid `crate_type` value
--> src/lib.rs:1:1
|
1 | #![crate_type = "proc_macro"]
| ^^^^^^^^^^^^ did you mean "proc-macro"?
|
= note: #[deny(unknown_crate_types)] on by default
error: aborting due to previous error
error: Could not compile `playground`.
The change here is that the error is on the value of the attribute and it asks the "did you mean" question that you get when you mistype a variable.
Activity
phansch commentedon Sep 5, 2018
I would like to work on this.
From a first look, I would re-use
rust/src/libsyntax/util/lev_distance.rs
Line 50 in b7c6e8f
somewhere around here:
rust/src/librustc_driver/driver.rs
Lines 1476 to 1481 in b7c6e8f
Rollup merge of rust-lang#54173 - phansch:suggest_valid_crate_type, r…