]> git.lizzy.rs Git - rust.git/blob - tests/ui/impl-trait/impl-trait-in-macro.rs
Rollup merge of #106097 - mejrs:mir_build2, r=oli-obk
[rust.git] / tests / ui / impl-trait / impl-trait-in-macro.rs
1 use std::fmt::Debug;
2
3 macro_rules! i {
4     ($($tr:tt)*) => { impl $($tr)* };
5 }
6
7 fn foo(x: i!(Debug), y: i!(Debug)) -> String {
8     let mut a = x;
9     a = y; //~ ERROR mismatched
10     format!("{:?}", a)
11 }
12
13 trait S<T> {}
14
15 fn much_universe<T: S<i!(Debug)>, U: IntoIterator<Item = i!(Iterator<Item = i!(Clone)>)>>(
16     _: i!(Debug + Clone),
17 ) {
18 }
19
20 fn main() {}