Closed
Description
The diagnostics introduced by #77524 are wrong in some cases, e.g. in gat-trait-path-missing-lifetime we get the following stderr:
error[E0107]: missing generics for associated type `X::Y`
--> src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.rs:5:8
|
5 | type Y<'a>;
| ^ expected 1 lifetime argument
|
note: associated type defined here, with 1 lifetime parameter: `'a`
--> src/test/ui/generic-associated-types/gat-trait-path-missing-lifetime.rs:5:8
|
5 | type Y<'a>;
| ^ --
help: use angle brackets to add missing lifetime argument
|
5 | type Y<'a><'a>;
| ^^^^
error: aborting due to previous error; 1 warning emitted
Originally posted by @b-naber in #79554 (comment)
Metadata
Metadata
Assignees
Labels
Area: Generic associated types (GATs)Area: Associated items (types, constants & functions)Area: Messages for errors, warnings, and lintsArea: Suggestions generated by the compiler applied by `cargo fix`Diagnostics: A diagnostic that is giving misleading or incorrect information.Diagnostics: A structured suggestion resulting in incorrect code.`#![feature(generic_associated_types)]` a.k.a. GATsRelevant to the compiler team, which will review and decide on the PR/issue.This issue requires a nightly compiler in some way.