2024-08-10 08:11:07 -05:00
|
|
|
//@ 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;
|
|
|
|
|
2024-10-05 04:44:53 -05:00
|
|
|
use another_proc_macro::{AnotherMacro, pointee};
|
2024-08-10 08:11:07 -05:00
|
|
|
|
2024-10-05 04:44:53 -05:00
|
|
|
#[derive(core::marker::CoercePointee)]
|
2024-08-10 08:11:07 -05:00
|
|
|
#[repr(transparent)]
|
|
|
|
pub struct Ptr<'a, #[pointee] T: ?Sized> {
|
|
|
|
data: &'a mut T,
|
|
|
|
}
|
|
|
|
|
|
|
|
#[pointee]
|
|
|
|
fn f() {}
|
|
|
|
|
|
|
|
#[derive(AnotherMacro)]
|
|
|
|
#[pointee]
|
|
|
|
struct MyStruct;
|
|
|
|
|
|
|
|
fn main() {}
|