diff options
Diffstat (limited to 'tests/ui/chalkify/chalk_initial_program.rs')
-rw-r--r-- | tests/ui/chalkify/chalk_initial_program.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/chalkify/chalk_initial_program.rs b/tests/ui/chalkify/chalk_initial_program.rs new file mode 100644 index 000000000..21de72b6f --- /dev/null +++ b/tests/ui/chalkify/chalk_initial_program.rs @@ -0,0 +1,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 +} |