blob: 7c469d99c5799c609663ced303e37367e53acfa5 [file] [log] [blame]
// check-fail
// compile-flags: -Z chalk
trait Foo { }
struct S<T: Foo> {
x: T,
}
impl Foo for i32 { }
impl<T> Foo for Option<T> { }
fn main() {
let s = S {
x: 5,
};
let s = S { //~ ERROR the trait bound `f64: Foo` is not satisfied
x: 5.0,
};
let s = S {
x: Some(5.0),
};
}