about summary refs log tree commit diff
path: root/tests/ui/impl-trait/in-trait/dont-probe-missing-item-name-3.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/impl-trait/in-trait/dont-probe-missing-item-name-3.rs')
-rw-r--r--tests/ui/impl-trait/in-trait/dont-probe-missing-item-name-3.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/in-trait/dont-probe-missing-item-name-3.rs b/tests/ui/impl-trait/in-trait/dont-probe-missing-item-name-3.rs
new file mode 100644
index 00000000000..db39bb35437
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/dont-probe-missing-item-name-3.rs
@@ -0,0 +1,11 @@
+trait Trait {
+    fn method() -> impl Sized;
+}
+
+// Ensure that we don't try to probe the name of the RPITIT when looking for
+// fixes to suggest for the missing associated type's trait path below.
+
+fn foo() -> i32::Assoc {}
+//~^ ERROR ambiguous associated type
+
+fn main() {}