diff options
Diffstat (limited to 'tests/ui/rust-2018/proc-macro-crate-in-paths.rs')
-rw-r--r-- | tests/ui/rust-2018/proc-macro-crate-in-paths.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/rust-2018/proc-macro-crate-in-paths.rs b/tests/ui/rust-2018/proc-macro-crate-in-paths.rs new file mode 100644 index 000000000..2d4cb6514 --- /dev/null +++ b/tests/ui/rust-2018/proc-macro-crate-in-paths.rs @@ -0,0 +1,16 @@ +// build-pass (FIXME(62277): could be check-pass?) +// force-host +// no-prefer-dynamic + +#![crate_type = "proc-macro"] +#![deny(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 +} |