summaryrefslogtreecommitdiffstats
path: root/tests/ui/proc-macro/allowed-signatures.rs
blob: 8685087611248be845055ef7b14b00f6cd4fdea6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// check-pass
// force-host
// no-prefer-dynamic

#![crate_type = "proc-macro"]
#![allow(private_in_public)]
extern crate proc_macro;
use proc_macro::TokenStream;

#[proc_macro]
pub fn foo<T>(t: T) -> TokenStream {
  TokenStream::new()
}

trait Project {
    type Assoc;
}

impl Project for () {
    type Assoc = TokenStream;
}

#[proc_macro]
pub fn uwu(_input: <() as Project>::Assoc) -> <() as Project>::Assoc {
    TokenStream::new()
}