summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/impl-trait-in-macro.rs
blob: 3165c9b9915723fc65f5e29e4e2ddf5f06e6c15a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use std::fmt::Debug;

macro_rules! i {
    ($($tr:tt)*) => { impl $($tr)* };
}

fn foo(x: i!(Debug), y: i!(Debug)) -> String {
    let mut a = x;
    a = y; //~ ERROR mismatched
    format!("{:?}", a)
}

trait S<T> {}

fn much_universe<T: S<i!(Debug)>, U: IntoIterator<Item = i!(Iterator<Item = i!(Clone)>)>>(
    _: i!(Debug + Clone),
) {
}

fn main() {}