Closed
Description
Cargo.toml
[package]
name = "procedural"
version = "0.0.1"
authors = ["David Tolnay <[email protected]>"]
edition = "2018"
[lib]
proc-macro = true
src/lib.rs
extern crate proc_macro;
use self::proc_macro::TokenStream;
#[proc_macro]
pub fn demo(_input: TokenStream) -> TokenStream {
TokenStream::new()
}
Running cargo fix --edition-idioms
I get:
warning: failed to automatically apply fixes suggested by rustc to crate `procedural`
after fixes were automatically applied the compiler reported errors within these files:
* src/lib.rs
This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report! You're likely to see
a number of compiler warnings after this message which cargo
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang/cargo/issues
quoting the full output of this command we'd be very appreciative!
warning: `extern crate` is not idiomatic in the new edition
--> src/lib.rs:1:1
|
1 | extern crate proc_macro;
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use`
|
= note: `-W unused-extern-crates` implied by `-W rust-2018-idioms`
warning: `extern crate` is not idiomatic in the new edition
--> src/lib.rs:1:1
|
1 | extern crate proc_macro;
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: convert it to a `use`
|
= note: `-W unused-extern-crates` implied by `-W rust-2018-idioms`
Metadata
Metadata
Assignees
Labels
No labels