Closed
Description
Originally reported as rust-lang/rustfix#121 it's reduced to:
#![crate_type = "proc-macro"]
#![warn(rust_2018_compatibility)]
#![feature(rust_2018_preview)]
extern crate proc_macro;
use proc_macro::TokenStream;
#[proc_macro_derive(Template, attributes(template))]
pub fn derive_template(input: TokenStream) -> TokenStream {
input
}
which generates:
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> src/lib.rs:10:1
|
10 | / pub fn derive_template(input: TokenStream) -> TokenStream {
11 | | input
12 | | }
| |_^
|
note: lint level defined here
--> src/lib.rs:2:9
|
2 | #![warn(rust_2018_compatibility)]
| ^^^^^^^^^^^^^^^^^^^^^^^
= note: #[warn(absolute_paths_not_starting_with_crate)] implied by #[warn(rust_2018_compatibility)]
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
help: use `crate`
|
10 | crate::pub fn derive_template(input: TokenStream) -> TokenStream {
11 | input
12 | }
|