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