-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Trivial bounds with associated types regression #134238
Copy link
Copy link
Open
Labels
A-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.P-lowLow priorityLow priorityT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.fixed-by-next-solverFixed by the next-generation trait solver, `-Znext-solver`.Fixed by the next-generation trait solver, `-Znext-solver`.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Metadata
Metadata
Assignees
Labels
A-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.P-lowLow priorityLow priorityT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.fixed-by-next-solverFixed by the next-generation trait solver, `-Znext-solver`.Fixed by the next-generation trait solver, `-Znext-solver`.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Code
I tried writing some macro code that in some cases generates code similar to:
I expected to see this happen: The code should compile without error.
Instead, this happened: The following compile error happens.
Discussing with @compiler-errors some it would appear #122791 is the cause of the change. The above code does compile if it isn't a trivial bound. For example when you do this instead:
For more context on 1.78.0 and before if you remove the
for<'a>you get the following.Version it worked on
It most recently worked on: 1.78.0
Version with regression
All versions including 1.79.0 and after. Specifically starting with nightly-2024-04-04 (found with a bisection).
@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged