mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
17 lines
334 B
Rust
17 lines
334 B
Rust
// compile-flags: -Z trait-solver=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
|
|
}
|