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