summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/suggest-assoc-fn-call-deref.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/suggestions/suggest-assoc-fn-call-deref.fixed')
-rw-r--r--tests/ui/suggestions/suggest-assoc-fn-call-deref.fixed15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/suggestions/suggest-assoc-fn-call-deref.fixed b/tests/ui/suggestions/suggest-assoc-fn-call-deref.fixed
new file mode 100644
index 000000000..8d96cf590
--- /dev/null
+++ b/tests/ui/suggestions/suggest-assoc-fn-call-deref.fixed
@@ -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));
+ Foo::<i32>::test();
+ //~^ ERROR no method named `test` found for struct `Box<Foo<i32>>` in the current scope
+}