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