diff options
Diffstat (limited to 'tests/ui/impl-trait/in-trait/dont-probe-missing-item-name-2.rs')
| -rw-r--r-- | tests/ui/impl-trait/in-trait/dont-probe-missing-item-name-2.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/in-trait/dont-probe-missing-item-name-2.rs b/tests/ui/impl-trait/in-trait/dont-probe-missing-item-name-2.rs new file mode 100644 index 00000000000..e8329e3694d --- /dev/null +++ b/tests/ui/impl-trait/in-trait/dont-probe-missing-item-name-2.rs @@ -0,0 +1,12 @@ +trait Foo { + fn rpitit() -> impl Sized; +} + +// Ensure that we don't try to probe the name of the RPITIT when looking for +// fixes to suggest for the redundant generic below. + +fn test<T: Foo<i32, Assoc = i32>>() {} +//~^ ERROR trait takes 0 generic arguments but 1 generic argument was supplied +//~| ERROR associated type `Assoc` not found for `Foo` + +fn main() {} |
