diff options
Diffstat (limited to 'tests/ui/error-codes/E0277.rs')
-rw-r--r-- | tests/ui/error-codes/E0277.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0277.rs b/tests/ui/error-codes/E0277.rs new file mode 100644 index 000000000..f0de4e3de --- /dev/null +++ b/tests/ui/error-codes/E0277.rs @@ -0,0 +1,17 @@ +use std::path::Path; + +trait Foo { + fn bar(&self); +} + +fn some_func<T: Foo>(foo: T) { + foo.bar(); +} + +fn f(p: Path) { } +//~^ ERROR the size for values of type + +fn main() { + some_func(5i32); + //~^ ERROR the trait bound `i32: Foo` is not satisfied +} |