rust/tests/ui/deriving/proc-macro-attribute-mixing.rs
Lukas Wirth 20ab952b4d Explicitly annotate edition for unpretty=expanded and unpretty=hir tests
These emit prelude imports which means they are always edition dependent
2025-04-16 11:10:10 +02:00

21 lines
548 B
Rust

// This test certify that we can mix attribute macros from Rust and external proc-macros.
// For instance, `#[derive(Default)]` uses `#[default]` and `#[derive(CoercePointee)]` uses
// `#[pointee]`.
// The scoping rule should allow the use of the said two attributes when external proc-macros
// are in scope.
//@ check-pass
//@ proc-macro: another-proc-macro.rs
//@ compile-flags: -Zunpretty=expanded
//@ edition: 2015
#![feature(derive_coerce_pointee)]
#[macro_use]
extern crate another_proc_macro;
#[pointee]
fn f() {}
#[default]
fn g() {}