summaryrefslogtreecommitdiffstats
path: root/src/test/ui/suggestions/suggest-assoc-fn-call-deref.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/suggestions/suggest-assoc-fn-call-deref.rs')
-rw-r--r--src/test/ui/suggestions/suggest-assoc-fn-call-deref.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/suggestions/suggest-assoc-fn-call-deref.rs b/src/test/ui/suggestions/suggest-assoc-fn-call-deref.rs
new file mode 100644
index 000000000..186901f75
--- /dev/null
+++ b/src/test/ui/suggestions/suggest-assoc-fn-call-deref.rs
@@ -0,0 +1,15 @@
+// run-rustfix
+
+#![allow(unused)]
+
+struct Foo<T>(T);
+
+impl<T> Foo<T> {
+ fn test() -> i32 { 1 }
+}
+
+fn main() {
+ let x = Box::new(Foo(1i32));
+ x.test();
+ //~^ ERROR no method named `test` found for struct `Box<Foo<i32>>` in the current scope
+}