diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/proc-macro/attr-complex-fn.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/test/ui/proc-macro/attr-complex-fn.rs b/src/test/ui/proc-macro/attr-complex-fn.rs new file mode 100644 index 000000000..47734c94f --- /dev/null +++ b/src/test/ui/proc-macro/attr-complex-fn.rs @@ -0,0 +1,26 @@ +// check-pass +// compile-flags: -Z span-debug --error-format human +// aux-build:test-macros.rs + +#![feature(stmt_expr_attributes)] +#![feature(custom_inner_attributes)] +#![feature(rustc_attrs)] + +#![no_std] // Don't load unnecessary hygiene information from std +extern crate std; + +#[macro_use] +extern crate test_macros; + +trait MyTrait<T> {} +struct MyStruct<const N: bool>; + +#[print_attr] +fn foo<T: MyTrait<MyStruct<{ true }>>>() {} + +impl<T> MyTrait<T> for MyStruct<{true}> { + #![print_attr] + #![rustc_dummy] +} + +fn main() {} |