]> git.lizzy.rs Git - rust.git/blob - src/test/ui/object-safety/object-safety-bounds.rs
Rollup merge of #106043 - c410-f3r:moar-errors, r=petrochenkov
[rust.git] / src / test / ui / object-safety / object-safety-bounds.rs
1 // Traits with bounds mentioning `Self` are not object safe
2
3 trait X {
4     type U: PartialEq<Self>;
5 }
6
7 fn f() -> Box<dyn X<U = u32>> {
8     //~^ ERROR the trait `X` cannot be made into an object
9     loop {}
10 }
11
12 fn main() {}