rust/src/test/compile-fail/chalkify/chalk_initial_program.rs
2018-12-27 19:21:16 +01:00

16 lines
321 B
Rust

// compile-flags: -Z chalk
trait Foo { }
impl Foo for i32 { }
impl Foo for u32 { }
fn gimme<F: Foo>() { }
// Note: this also tests that `std::process::Termination` is implemented for `()`.
fn main() {
gimme::<i32>();
gimme::<u32>();
gimme::<f32>(); //~ERROR the trait bound `f32: Foo` is not satisfied
}