]> git.lizzy.rs Git - rust.git/blob - tests/ui/chalkify/impl_wf.rs
Rollup merge of #106661 - mjguzik:linux_statx, r=Mark-Simulacrum
[rust.git] / tests / ui / chalkify / impl_wf.rs
1 // compile-flags: -Z trait-solver=chalk
2
3 trait Foo: Sized { }
4
5 trait Bar {
6     type Item: Foo;
7 }
8
9 impl Foo for i32 { }
10
11 impl Foo for str { }
12 //~^ ERROR the size for values of type `str` cannot be known at compilation time
13
14
15 // Implicit `T: Sized` bound.
16 impl<T> Foo for Option<T> { }
17
18 trait Baz<U: ?Sized> where U: Foo { }
19
20 impl Baz<i32> for i32 { }
21
22 impl Baz<f32> for f32 { }
23 //~^ ERROR the trait bound `f32: Foo` is not satisfied
24
25 fn main() {
26 }