-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Inherent associated types defined on non-ADTs don't resolve successfully #106719
Copy link
Copy link
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-inherent_associated_types`#![feature(inherent_associated_types)]``#![feature(inherent_associated_types)]`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.F-inherent_associated_types`#![feature(inherent_associated_types)]``#![feature(inherent_associated_types)]`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.
Projects
Status
Can Do
Inherent associated types where the self type isn't an ADT (e.g. a trait object type or a primitive type like
boolori32) are currently not resolved successfully.On Trait Object Types
I expected to see the following code compile successfully:
Instead, the following error was emitted:
For comparison, the analogous code involving inherent associated constants works flawlessly.
On Primitive Types
I expected to see the following code compile successfully (
#![no_core]is representative for thecorecrate)Instead, the following error was emitted:
I'd like to see #105961 merged first. Thus I consider this issue blocked for now.
@rustbot label T-compiler F-inherent_associated_types requires-nightly S-blocked
@rustbot claim