-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
hrtb + infer types break auto traits with return type notation #109924
Copy link
Copy link
Open
Labels
A-auto-traitsArea: auto traits (e.g., `auto trait Send {}`)Area: auto traits (e.g., `auto trait Send {}`)A-higher-rankedArea: Higher-ranked things (e.g., lifetimes, types, trait bounds aka HRTBs)Area: Higher-ranked things (e.g., lifetimes, types, trait bounds aka HRTBs)C-bugCategory: This is a bug.Category: This is a bug.F-return_type_notation`#[feature(return_type_notation)]``#[feature(return_type_notation)]`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.
Metadata
Metadata
Assignees
Labels
A-auto-traitsArea: auto traits (e.g., `auto trait Send {}`)Area: auto traits (e.g., `auto trait Send {}`)A-higher-rankedArea: Higher-ranked things (e.g., lifetimes, types, trait bounds aka HRTBs)Area: Higher-ranked things (e.g., lifetimes, types, trait bounds aka HRTBs)C-bugCategory: This is a bug.Category: This is a bug.F-return_type_notation`#[feature(return_type_notation)]``#[feature(return_type_notation)]`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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
No status
I tried this code:
I expected it to compile, instead:
This error message is not super clear, but it's essentially equvialent to this code:
Which results in:
So this is related to other higher-ranked projection normalization problems.