]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coherence/coherence-with-closure.rs
Rollup merge of #104750 - mati865:bump-fd-lock-again, r=jyn514
[rust.git] / src / test / ui / coherence / coherence-with-closure.rs
1 // Test that encountering closures during coherence does not cause issues.
2 #![feature(type_alias_impl_trait)]
3 type OpaqueClosure = impl Sized;
4 fn defining_use() -> OpaqueClosure {
5     || ()
6 }
7
8 struct Wrapper<T>(T);
9 trait Trait {}
10 impl Trait for Wrapper<OpaqueClosure> {}
11 impl<T: Sync> Trait for Wrapper<T> {}
12 //~^ ERROR conflicting implementations of trait `Trait` for type `Wrapper<OpaqueClosure>`
13
14 fn main() {}