2024-08-10 08:11:07 -05:00
|
|
|
#![feature(prelude_import)]
|
|
|
|
#![no_std]
|
|
|
|
// 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
|
|
|
#[prelude_import]
|
|
|
|
use ::std::prelude::rust_2015::*;
|
|
|
|
#[macro_use]
|
|
|
|
extern crate std;
|
|
|
|
|
|
|
|
#[macro_use]
|
|
|
|
extern crate another_proc_macro;
|
|
|
|
|
|
|
|
|
|
|
|
const _: () =
|
|
|
|
{
|
|
|
|
const POINTEE_MACRO_ATTR_DERIVED: () = ();
|
|
|
|
};
|
|
|
|
const _: () =
|
|
|
|
{
|
|
|
|
const DEFAULT_MACRO_ATTR_DERIVED: () = ();
|
|
|
|
};
|