summaryrefslogtreecommitdiffstats
path: root/src/test/ui/error-codes/E0277.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/error-codes/E0277.rs')
-rw-r--r--src/test/ui/error-codes/E0277.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/error-codes/E0277.rs b/src/test/ui/error-codes/E0277.rs
new file mode 100644
index 000000000..f0de4e3de
--- /dev/null
+++ b/src/test/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
+}