Confusing E0284
"type annotations needed" when trait method bound trait bound conflict in associated type.
#105513
Labels
A-associated-items
Area: Associated items (types, constants & functions)
A-diagnostics
Area: Messages for errors, warnings, and lints
A-trait-system
Area: Trait system
D-confusing
Diagnostics: Confusing error or lint that should be reworked.
D-terse
Diagnostics: An error or lint that doesn't give enough information about the problem at hand.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code (playground link):
(i.e. the bound on
fn test
conflicts with the bound of its trait by way of associated types)The current output is:
Ideally the output should look like: something mentioning the conflicting bounds. (Or under
#![feature(trivial_bounds)]
, maybe it could just be a trivially false bound?).Same result on stable, beta, and nightly.
Related: #103292, (can't find the issue at the moment, but
impl<T: Trait<Assoc = u32>> SecondTrait for T
conflicting withimpl<T: Trait<Assoc = u64>> SecondTrait for T
when it shouldn't is related).@rustbot modify labels +A-traits +D-confusing +A-associated-items
The text was updated successfully, but these errors were encountered: