-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Open
Labels
A-coinductionArea: Concerning coinduction, most often for auto traitsArea: Concerning coinduction, most often for auto traitsA-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityS-has-bisectionStatus: A bisection has been found for this issueStatus: A bisection has been found for this issueT-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.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Description
rustc 1.91.0 as well as nightly (1.93.0-nightly (2025-10-30 d5419f1e97b90741d518)) produce an overflow error when using a where clause on an associated type when the bound in the where clause is empty. While this is a pathological example, this did occur in auto-generated code (e.g. in verus).
trait SomeBound {}
trait T where
Self::Assoc:,
// this works:
//Self::Assoc: SomeBound
{
type Assoc;
}I expected this to compile successfully (and indeed it did on Rust 1.88).
On nightly and with 1.91 (rustc 1.91.0 (f8297e351 2025-10-28)), I get the following error:
Compiling playground v0.0.1 (/playground)
error[E0275]: overflow evaluating the requirement `<Self as T>::Assoc well-formed`
--> src/lib.rs:4:5
|
4 | Self::Assoc:,
| ^^^^^^^^^^^
|
note: required by a bound in `T`
--> src/lib.rs:4:5
|
3 | trait T where
| - required by a bound in this trait
4 | Self::Assoc:,
| ^^^^^^^^^^^ required by this bound in `T`
For more information about this error, try `rustc --explain E0275`.
error: could not compile `playground` (lib) due to 1 previous error
Metadata
Metadata
Assignees
Labels
A-coinductionArea: Concerning coinduction, most often for auto traitsArea: Concerning coinduction, most often for auto traitsA-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityS-has-bisectionStatus: A bisection has been found for this issueStatus: A bisection has been found for this issueT-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.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.