summaryrefslogtreecommitdiffstats
path: root/tests/ui/chalkify/chalk_initial_program.rs
blob: 21de72b6fcccbc8c2d3eca1a2a1d30eca121564c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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
}