about summary refs log tree commit diff
path: root/tests/ui/deriving/proc-macro-attribute-mixing.rs
blob: c9e123d7e8a12eecfb1878e7141ab333cb5fbb1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// 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() {}