]> git.lizzy.rs Git - rust.git/blob - src/test/ui/chalkify/type_wf.rs
Merge commit '3e7c6dec244539970b593824334876f8b6ed0b18' into clippyup
[rust.git] / src / test / ui / chalkify / type_wf.rs
1 // check-fail
2 // compile-flags: -Z chalk
3
4 trait Foo { }
5
6 struct S<T: Foo> {
7     x: T,
8 }
9
10 impl Foo for i32 { }
11 impl<T> Foo for Option<T> { }
12
13 fn main() {
14     let s = S {
15        x: 5,
16     };
17
18     let s = S { //~ ERROR the trait bound `{float}: Foo` is not satisfied
19         x: 5.0,
20     };
21
22     let s = S {
23         x: Some(5.0),
24     };
25 }