-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Ambiguous associated type when using associated_type_bounds feature #76593
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.D-incorrectDiagnostics: A diagnostic that is giving misleading or incorrect information.Diagnostics: A diagnostic that is giving misleading or incorrect information.F-associated_type_bounds`#![feature(associated_type_bounds)]``#![feature(associated_type_bounds)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.D-incorrectDiagnostics: A diagnostic that is giving misleading or incorrect information.Diagnostics: A diagnostic that is giving misleading or incorrect information.F-associated_type_bounds`#![feature(associated_type_bounds)]``#![feature(associated_type_bounds)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Type
Fields
Give feedbackNo fields configured for issues without a type.
produces an ambiguous, and nonsensical, associated type error even though
Blobis introduced only once viaLoad:If the use of associated type bounds is removed and replaced by equivalent
whereclauses, the problem goes away. This version compiles without error:FWIW in this codebase it looks like associated types could save quite a lot of boilerplate, as these will be quite common type bounds. So if you have a better idea how to do this, I'd love to hear!
Meta
rustc --version --verbose: