Repository navigation
Inconsistent "overflow evaluating the requirement" error for adding impl in another crate #77446
Copy link
Copy link
Closed
Labels
A-coherenceArea: CoherenceArea: CoherenceA-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.S-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.
Description
I tried this code:
(lib.rs)
pub trait SqlType {
type IsNull;
}
pub trait IntoNullable {
type Nullable;
}
pub trait IntoNotNullable {
type NotNullable;
}
pub trait Expression {
type SqlType: SqlType;
}
pub trait AsExpression<T>
where
T: SqlType,
{
type Expression: Expression<SqlType = T>;
}
pub mod is_nullable {
pub struct NotNull;
pub struct IsNullable;
}
pub struct Bool;
impl SqlType for Bool {
type IsNull = is_nullable::NotNull;
}
impl<T> IntoNotNullable for T
where
T: SqlType<IsNull = is_nullable::NotNull>,
{
type NotNullable = T;
}
impl<T, ST> AsExpression<ST> for T
where
ST: SqlType + IntoNotNullable,
ST::NotNullable: SqlType,
ExpressionImplHelper<T, ST::IsNull, <T::SqlType as SqlType>::IsNull>: AsExpression<ST>,
T: Expression,
T::SqlType: SqlType,
{
type Expression =
<ExpressionImplHelper<T, ST::IsNull, <T::SqlType as SqlType>::IsNull> as AsExpression<
ST,
>>::Expression;
}
pub struct Bound<T>(std::marker::PhantomData<T>);
impl<T> Expression for Bound<T>
where
T: SqlType,
{
type SqlType = T;
}
#[allow(missing_debug_implementations)]
pub struct ExpressionImplHelper<T, IsNullExpr, IsNullAsExpr>(
pub T,
pub std::marker::PhantomData<(IsNullExpr, IsNullAsExpr)>,
);(main.rs)
use a::*;
struct MyType(bool);
impl AsExpression<Bool> for MyType {
type Expression = Bound<Bool>;
}
struct MyMarkerType;
impl SqlType for MyMarkerType {
type IsNull = is_nullable::NotNull;
}
impl AsExpression<MyMarkerType> for MyType {
type Expression = Bound<MyMarkerType>;
}I expected this code to compile without any issue or a clear error message why I cannot implment that AsExpression there, but instead I got a compilation error:
error[E0275]: overflow evaluating the requirement `a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::Expresa::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, sionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<MyType, _, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>: a::AsExpression<MyMarkerType>`
|
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`a`)
= note: required because of the requirements on the impl of `a::AsExpression<MyMarkerType>` for `a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::Expresa::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, sionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<MyType, _, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>`
= note: required because of the requirements on the impl of `a::AsExpression<MyMarkerType>` for `a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<a::ExpressionImplHelper<MyType, _, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>, a::is_nullable::NotNull, _>`
As an intresting side note: This happens for the following impl:
impl AsExpression<MyMarkerType> for MyType {
type Expression = Bound<MyMarkerType>;
}removing it results in a successful compilation.
Meta
rustc --version --verbose: rustc 1.48.0-nightly (fc2daaae6 2020-09-28)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-coherenceArea: CoherenceArea: CoherenceA-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.S-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.
Activity
fmease commentedon Feb 11, 2025
This now compiles successfully. Bisecting…
fmease commentedon Feb 11, 2025
Ah, right. #130654 (stabilize
-Znext-solver=coherence) fixed this, makes sense. I do wonder though if we need an extra regression test 🤔 I doubt it.weiznich commentedon Feb 11, 2025
@fmease As this is marked with
E-needs-mcvc: Isn't the example provided above sufficient?compiler-errors commentedon Feb 11, 2025
It's best if whoever's analyzing this tries to simplify it further. It definitely doesn't look minimal.
moxian commentedon Mar 11, 2025
minimized, somewhat:
The fact that the ordering of the where clauses (both in the original, and in the reduced version) makes the error go away makes me think that the bug is due to a minor implementation detail, and a test is unlikely to catch future problems(?)...
Opportunistically
@rustbot labels: -E-needs-mcve +fixed-by-next-solver
rustbot commentedon Mar 11, 2025
Error: Label fixed-by-next-solver can only be set by Rust team members
Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #t-infra on Zulip.
lcnr commentedon Aug 11, 2026
this minimization looks like the "overflowing obligation order dependence" issue we already added test for with coherence. closing