summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/issue-65284-suggest-generic-trait-bound.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/traits/issue-65284-suggest-generic-trait-bound.rs')
-rw-r--r--tests/ui/traits/issue-65284-suggest-generic-trait-bound.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/traits/issue-65284-suggest-generic-trait-bound.rs b/tests/ui/traits/issue-65284-suggest-generic-trait-bound.rs
new file mode 100644
index 000000000..018ce0459
--- /dev/null
+++ b/tests/ui/traits/issue-65284-suggest-generic-trait-bound.rs
@@ -0,0 +1,11 @@
+trait Foo {
+ fn foo(&self);
+}
+
+trait Bar {}
+
+fn do_stuff<T : Bar>(t : T) {
+ t.foo() //~ ERROR no method named `foo` found
+}
+
+fn main() {}