rust/tests/ui/chalkify/chalk_initial_program.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
334 B
Rust
Raw Normal View History

2023-01-02 17:18:00 -06:00
// compile-flags: -Z trait-solver=chalk
2020-03-03 10:25:03 -06:00
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
}