]> git.proxmox.com Git - rustc.git/blame - src/test/ui/chalkify/impl_wf_2.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / chalkify / impl_wf_2.rs
CommitLineData
29967ef6
XL
1// Split out of impl_wf.rs to work around rust aborting compilation early
2
3// compile-flags: -Z chalk
4
5trait Foo: Sized { }
6
7trait Bar {
8 type Item: Foo;
9}
10
11impl Foo for i32 { }
12
13// Implicit `T: Sized` bound.
14impl<T> Foo for Option<T> { }
15
16impl Bar for () {
17 type Item = i32;
18}
19
20impl<T> Bar for Option<T> {
21 type Item = Option<T>;
22}
23
24impl Bar for f32 {
25 type Item = f32;
26 //~^ ERROR the trait bound `f32: Foo` is not satisfied
27}
28
29trait Baz<U: ?Sized> where U: Foo { }
30
31impl Baz<i32> for i32 { }
32
33fn main() {}