summaryrefslogtreecommitdiffstats
path: root/tests/ui/proc-macro/allowed-signatures.rs
blob: ce327901b1a24cac5ed37a7ba6e36a1cb2e92c56 (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_interfaces)]
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()
}