diff options
| author | bors <bors@rust-lang.org> | 2025-04-22 04:44:13 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-04-22 04:44:13 +0000 |
| commit | 9bfa31f632912180dc742809bcc51a97f2d7079d (patch) | |
| tree | 5a42c63162e0fc9c3936abde7cb8b5f8d6c27cf9 /tests/ui/impl-trait/in-trait/dont-probe-missing-item-name-2.rs | |
| parent | fae7785b60ea7fe1ad293352c057a5b7be73d245 (diff) | |
| parent | ddf01760acda4f9a78823e826a1764c04150100e (diff) | |
| download | rust-9bfa31f632912180dc742809bcc51a97f2d7079d.tar.gz rust-9bfa31f632912180dc742809bcc51a97f2d7079d.zip | |
Auto merge of #140138 - ChrisDenton:rollup-zw7jibi, r=ChrisDenton
Rollup of 5 pull requests Successful merges: - #139981 (Don't compute name of associated item if it's an RPITIT) - #140077 (Construct OutputType using macro and print [=FILENAME] help info) - #140081 (Update `libc` to 0.2.172) - #140094 (Improve diagnostics for pointer arithmetic += and -= (fixes #137391)) - #140128 (Use correct annotation for CSS pseudo elements) r? `@ghost` `@rustbot` modify labels: rollup
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() {} |
