Rust
E0275 Overflow Evaluating Requirement Fix
You write an impl whose requirement refers back to itself through a bigger type - proving T is Foo first requires proving Bar
Written December 2, 2026 · Tested with Rust 1.99.1 · 20 min read
- The rule underneath: the requirement must get smaller, or end
- How to read the diagnostic
- The first failure: the index example
- A wrapper impl that asks for a doubly wrapped type
Written December 2, 2026
Tested with Rust 1.99.1
What this guide is
Error E0275 means an evaluation of a trait requirement overflowed. The error codes index puts it in one sentence: "An evaluation of a trait requirement overflowed."
In the shapes probed in this guide, E0275 fires when a requirement can only be answered by asking the same question about a bigger type, or about another trait that asks it back, with no base case to stop at. The growing blanket impl in the index example draws the error at the impl itself, before any use. The circular shapes - two traits requiring each other, and an impl whose where clause requires its own type - draw the error only at a call site where a concrete type is checked, and compile with dead-code warnings only when never used. A missing impl with no recursion draws E0277 instead, and a recursive struct draws E0072. This guide shows the E0275 shapes, the neighboring shapes, and the repairs.
Build every program in this guide with rustc --edition 2021. In the compiler transcripts, the file names are the bare names shown on the command line.
The rule underneath: the requirement must get smaller, or end
To use an impl, the compiler has to prove its requirements. A requirement is answerable when each step replaces it with a smaller question - Bar<T> is Foo because T is Foo, and T is a concrete type with its own impl - until a question is answered directly by an impl with no further requirements.
The index example breaks that in the growing direction: T is Foo only if Bar<T> is Foo, and Bar<T> is a bigger type than T. Every step makes the question bigger, so the steps never end. The index page says the same thing in its own words: this error occurs when there was a recursive trait requirement that overflowed before it could be evaluated, which often means there is an unbounded recursion in resolving some type bounds, and it advises considering changing your trait bounds so that they are less self-referential.
A circular requirement breaks it differently: the question does not grow, it repeats. Bar<T> is Foo only if Bar<T> is Foo, or i32 is A only if it is B, which holds only if it is A. There is still no step that answers the question directly, so evaluation still overflows when a concrete answer is demanded.
How to read the diagnostic
The E0275 header names the requirement that overflowed, in backticks. For the growing shapes in this guide that requirement is itself a deeply wrapped type, truncated with an underscore: the header shows seven layers of Bar<...> and the notes report 126 redundant requirements hidden in the probed programs. When the header's type keeps wrapping the same outer type around itself, the impl's requirement is growing the type. When the header names a small requirement, such as Bar<i32>: Foo or i32: A in the probed circular shapes, the requirement is repeating instead of growing - read the note: required for ... lines to walk the circle.
The span matters as much as the header. In the probed growing shapes the error is reported on the impl's where clause or bound, because the overflow is found while the impl itself is being checked. In the probed circular shapes the error is reported on the call in main, because nothing overflows until a concrete type is checked against the bound.
The diagnostic for the growing shapes also offers a help line: consider increasing the recursion limit. In the probed shape that help does not repair the program - see the recursion limit section below. The limit decides how deep the compiler digs before reporting the overflow; it does not give the requirement a base case.
The first failure: the index example
The index's erroneous example, verbatim:
#![allow(unused)]
fn main() {
trait Foo {}
struct Bar<T>(T);
impl<T> Foo for T where Bar<T>: Foo {}
}
error[E0275]: overflow evaluating the requirement `Bar<Bar<Bar<Bar<Bar<Bar<Bar<_>>>>>>>: Foo`
--> fail_index.rs:7:33
|
7 | impl<T> Foo for T where Bar<T>: Foo {}
| ^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`fail_index`)
note: required for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<_>>>>>>>>>>>>>` to implement `Foo`
--> fail_index.rs:7:9
|
7 | impl<T> Foo for T where Bar<T>: Foo {}
| ^^^ ^ --- unsatisfied trait bound introduced here
= note: 126 redundant requirements hidden
= note: required for `Bar<T>` to implement `Foo`
= note: the full name for the type has been written to 'fail_index.long-type-6645221259222970039.txt'
= note: consider using `--verbose` to print the full type name to the console
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
The example draws exactly one E0275, on the impl's where clause, with no other error alongside it. Nothing in the program ever asks for a Foo - there is no call and no bound used anywhere - and the error still fires, because checking the blanket impl itself already requires evaluating its where clause for a generic T, and that evaluation is the one that grows without end.
Adding a use does not change the impl's own error; it adds a second one. With a function bound and a call added, the same impl drew two E0275 errors in the probed shape - the first on the impl's where clause, exactly as above, and the second on the Foo bound of the function being called from:
trait Foo {}
struct Bar<T>(T);
impl<T> Foo for T where Bar<T>: Foo {}
fn need_foo<T: Foo>(_: T) {}
fn main() { need_foo(0i32); }
The second error is reported at fail_blanket_use.rs:4:16, on the Foo in the need_foo signature, with the same wrapped requirement in its header and the same 126 redundant requirements hidden in its notes. Calling the function with a wrapped value instead - need_foo(Bar(0i32)) - drew the same two E0275 errors in the probed shape, the first on the impl and the second on the function bound. The value passed does not decide this error; the blanket impl's where clause overflows for every type.
A wrapper impl that asks for a doubly wrapped type
The growing shape does not need a blanket impl over every T. An impl for the wrapper alone overflows the same way when its where clause asks for a bigger type than the one being implemented - here, implementing Foo for Bar<T> requires both T: Foo and Bar<Bar<T>>: Foo:
trait Foo {}
struct Bar<T>(T);
impl<T: Foo> Foo for Bar<T> where Bar<Bar<T>>: Foo {}
fn need_foo<T: Foo>(_: T) {}
fn main() { need_foo(Bar(0i32)); println!("hi"); }
error[E0275]: overflow evaluating the requirement `Bar<Bar<Bar<Bar<Bar<Bar<Bar<_>>>>>>>: Foo`
--> fail_grow_impl.rs:3:48
|
3 | impl<T: Foo> Foo for Bar<T> where Bar<Bar<T>>: Foo {}
| ^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`fail_grow_impl`)
note: required for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<_>>>>>>>>>>>>>` to implement `Foo`
--> fail_grow_impl.rs:3:14
|
3 | impl<T: Foo> Foo for Bar<T> where Bar<Bar<T>>: Foo {}
| ^^^ ^^^^^^ --- unsatisfied trait bound introduced here
= note: 126 redundant requirements hidden
= note: required for `Bar<Bar<T>>` to implement `Foo`
= note: the full name for the type has been written to 'fail_grow_impl.long-type-5341226963229961192.txt'
= note: consider using `--verbose` to print the full type name to the console
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
This shape drew exactly one E0275 in the probed program, on the where clause, even though the impl also carries an ordinary shrinking bound, T: Foo. One growing requirement in the clause is enough: proving Bar<Bar<T>>: Foo applies the same impl again and asks for Bar<Bar<Bar<Bar<T>>>>: Foo, and so on.
The circular shapes: the error waits for a call site
Not every E0275 grows the type. An impl whose where clause requires the very type being implemented - Bar<T> is Foo only if Bar<T> is Foo - drew no error at the impl in the probed shape. It drew exactly one E0275 at the call, where a concrete type finally had to be checked:
trait Foo {}
struct Bar<T>(T);
impl<T> Foo for Bar<T> where Bar<T>: Foo {}
fn need_foo<T: Foo>(_: T) {}
fn main() { need_foo(Bar(0i32)); println!("hi"); }
error[E0275]: overflow evaluating the requirement `Bar<i32>: Foo`
--> fail_self_bound.rs:5:13
|
5 | fn main() { need_foo(Bar(0i32)); println!("hi"); }
| ^^^^^^^^^^^^^^^^^^^
|
note: required for `Bar<i32>` to implement `Foo`
--> fail_self_bound.rs:3:9
|
3 | impl<T> Foo for Bar<T> where Bar<T>: Foo {}
| ^^^ ^^^^^^ --- unsatisfied trait bound introduced here
note: required by a bound in `need_foo`
--> fail_self_bound.rs:4:16
|
4 | fn need_foo<T: Foo>(_: T) {}
| ^^^ required by this bound in `need_foo`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
The header names the concrete requirement itself, Bar<i32>: Foo - no wrapped tower, no recursion-limit help, and no hidden-requirements note in the probed output. The note lines walk the circle in two steps: the call requires Bar<i32>: Foo, and the only impl for it requires Bar<i32>: Foo again.
Two traits can form the same circle without any wrapper type. A blanket impl making every B an A, and another making every A a B, drew exactly one E0275 in the probed shape, again at the call site:
trait A {}
trait B {}
impl<T: B> A for T {}
impl<T: A> B for T {}
fn need_a<T: A>(_: T) {}
fn main() { need_a(0i32); }
error[E0275]: overflow evaluating the requirement `i32: A`
--> fail_mutual.rs:6:13
|
6 | fn main() { need_a(0i32); }
| ^^^^^^^^^^^^
|
note: required for `i32` to implement `B`
--> fail_mutual.rs:4:12
|
4 | impl<T: A> B for T {}
| - ^ ^
| |
| unsatisfied trait bound introduced here
note: required for `i32` to implement `A`
--> fail_mutual.rs:3:12
|
3 | impl<T: B> A for T {}
| - ^ ^
| |
| unsatisfied trait bound introduced here
note: required by a bound in `need_a`
--> fail_mutual.rs:5:14
|
5 | fn need_a<T: A>(_: T) {}
| ^ required by this bound in `need_a`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0275`.
The notes alternate between the two traits - i32: A requires i32: B, which requires i32: A - which is the circle to break. Neither impl is wrong on its own in isolation; together they leave no type with a direct route into either trait.
Raising the recursion limit does not repair a growing requirement
The growing shapes carry a help line suggesting a higher recursion limit. Following it on the index example - adding the suggested attribute at the suggested value - drew E0275 again in the probed shape, on the same where clause, with the help now suggesting a limit of 512 and the notes reporting 254 redundant requirements hidden instead of 126:
#![allow(unused)]
#![recursion_limit = "256"]
fn main() {
trait Foo {}
struct Bar<T>(T);
impl<T> Foo for T where Bar<T>: Foo {}
}
error[E0275]: overflow evaluating the requirement `Bar<Bar<Bar<Bar<Bar<Bar<Bar<_>>>>>>>: Foo`
--> fail_index_limit256.rs:8:33
|
8 | impl<T> Foo for T where Bar<T>: Foo {}
| ^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "512"]` attribute to your crate (`fail_index_limit256`)
The rest of the probed transcript matches the first failure's shape: one E0275, the wrapped requirement in the header, and the hidden-requirements note - at 254 instead of 126. A higher limit is the right tool when a requirement is deep but finite. A growing requirement is not finite at any limit, so the repair is in the impl, not the limit.
The shapes that are not this error
The circular impls compile when nothing ever demands a concrete answer. The self-referential impl from the earlier section, in a program whose main only prints, compiled and printed hi in the probed shape, drawing only two dead-code warnings - one stating the trait Foo is never used, and one stating the struct Bar is never constructed:
trait Foo {}
struct Bar<T>(T);
impl<T> Foo for Bar<T> where Bar<T>: Foo {}
fn main() { println!("hi"); }
hi
The two-traits circle behaved the same way in the probed shape: with the call removed, the program compiled and printed hi, drawing only two dead-code warnings stating that the traits A and B are never used. An unused circular impl is not yet an overflow - the overflow in the probed shapes arrived with the first call that checked a concrete type against the bound. That also means deleting the failing call hides this error without repairing anything: the impl still has no base case, and the next call site brings the error back.
Recursion in an associated type is not automatically this error either. In the probed shape, an impl giving Bar<T> an associated type built from T's own associated type, over a type with no base impl of the trait, drew E0277 - the trait bound i32: Foo is not satisfied - and no E0275:
trait Foo { type Out; }
struct Bar<T>(T);
impl<T: Foo> Foo for Bar<T> { type Out = Bar<T::Out>; }
fn need_out<T: Foo>(_: T) {}
fn main() { need_out(Bar(0i32)); }
The chain there fails at its first step, because i32 has no impl of Foo at all in the probed program, so there is no recursion to overflow - the requirement is simply unmet, which is E0277's territory.
A missing impl with no recursion anywhere is likewise E0277, not E0275. Requiring Foo of a type with no impl in sight drew exactly one E0277 in the probed shape:
trait Foo {}
struct Bar<T>(T);
fn need_foo<T: Foo>(_: T) {}
fn main() { need_foo(Bar(0i32)); }
error[E0277]: the trait bound `Bar<i32>: Foo` is not satisfied
--> neighbour_e0277.rs:4:22
|
4 | fn main() { need_foo(Bar(0i32)); }
| -------- ^^^^^^^^^ unsatisfied trait bound
| |
| required by a bound introduced by this call
|
help: the trait `Foo` is not implemented for `Bar<i32>`
--> neighbour_e0277.rs:2:1
|
2 | struct Bar<T>(T);
| ^^^^^^^^^^^^
help: this trait has no implementations, consider adding one
--> neighbour_e0277.rs:1:1
|
1 | trait Foo {}
| ^^^^^^^^^
note: required by a bound in `need_foo`
--> neighbour_e0277.rs:3:16
|
3 | fn need_foo<T: Foo>(_: T) {}
| ^^^ required by this bound in `need_foo`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0277`.
The boundary is whether evaluation can finish at all: a requirement that fails immediately is E0277, and a requirement whose evaluation never terminates is E0275.
Recursion in the type itself, rather than in a trait requirement, is a different code again. A struct that contains itself directly, with no indirection, drew E0072 alone in the probed shape:
struct Bar { next: Bar }
fn main() { println!("hi"); }
error[E0072]: recursive type `Bar` has infinite size
--> neighbour_e0072.rs:1:1
|
1 | struct Bar { next: Bar }
| ^^^^^^^^^^ --- recursive without indirection
|
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
|
1 | struct Bar { next: Box<Bar> }
| ++++ +
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0072`.
Related guides
Trait-requirement errors sit next to each other. For a requirement that fails outright because no impl satisfies it, see Trait Bound Not Satisfied E0277 Fix. For an impl that adds stricter requirements than the trait allows, see Impl Stricter Requirements E0276 Fix. For a recursive type with infinite size, see Recursive Type E0072 Fix.
The repairs
Every repair below gives the requirement a way to end: the question shrinks at each step, and a concrete impl answers it at the bottom.
Require the inner type, not the wrapped type. Replacing the blanket impl with an impl for the wrapper whose where clause requires T: Foo - the smaller type inside - plus a direct impl for a concrete base type, compiles and runs in the probed shape, printing has Foo for a doubly wrapped value:
trait Foo {}
struct Bar<T>(T);
impl Foo for i32 {}
impl<T> Foo for Bar<T> where T: Foo {}
fn need_foo<T: Foo>(_: T) { println!("has Foo"); }
fn main() { need_foo(Bar(Bar(0i32))); }
has Foo
Each step now asks about a smaller type: Bar<Bar<i32>>: Foo requires Bar<i32>: Foo, which requires i32: Foo, which the direct impl answers. The same repair written with the bound on the impl's type parameter instead of a where clause - impl<T: Foo> Foo for Bar<T> {} with the same base impl - also compiled and ran in the probed shape, printing has Foo for the same doubly wrapped call.
Or implement the trait for the concrete types you actually need, and drop the recursive impl entirely. An impl for i32 and an impl for the one wrapped type in use compiled and ran in the probed shape, printing has Foo:
trait Foo {}
struct Bar<T>(T);
impl Foo for i32 {}
impl Foo for Bar<i32> {}
fn need_foo<T: Foo>(_: T) { println!("has Foo"); }
fn main() { need_foo(Bar(0i32)); }
has Foo
There is no generic route left to overflow: each type in the program has its own direct impl, and no impl's requirement mentions a wrapped type. This is the smaller repair when only a few concrete types need the trait; the shrinking-bound repair above is the one to keep when any depth of wrapping must work.
For the circular shapes, the same principle applies in the repeating direction: at least one type needs a direct impl that does not route through the circle. In the two-traits shape that means implementing A or B directly for the concrete types that need it, instead of deriving each trait from the other for every type; in the self-referential shape it means the impl's where clause must require something other than the type being implemented - the inner type, as in the first repair, or nothing at all for a concrete impl, as in the second.
Fixes in reach order
First, look at the requirement in the E0275 header. In the probed shapes it arrived in two forms: a wrapped tower - seven layers of Bar<...> truncated with an underscore, with 126 redundant requirements hidden - for the growing shapes (the index example's blanket impl, the same impl used from a function bound, and a wrapper impl requiring Bar<Bar<T>>: Foo), and the concrete requirement itself - Bar<i32>: Foo, and i32: A - for the circular shapes (an impl requiring its own type, and two traits requiring each other).
Second, note where the error is reported. In the probed growing shapes it is reported on the impl itself - on the where clause, and, when a use was added, also on the function bound - because the overflow is found while the impl is checked. In the probed circular shapes it is reported on the call in main, and the same impls compile with dead-code warnings only when never used in the probed shapes.
Third, do not reach for the recursion limit first. In the probed shape, adding #![recursion_limit = "256"] to the index example drew E0275 again, with the help suggesting 512 and 254 redundant requirements hidden instead of 126. A higher limit helps only a requirement that is deep and finite; a growing requirement is not finite at any limit.
Fourth, check that you are looking at an overflow at all. In the probed shapes, a recursive associated type over a type with no base impl drew E0277, a missing impl with no recursion drew E0277, and a recursive struct with no indirection drew E0072. Those have their own repairs, and none of them is fixed by restructuring a where clause for recursion.
Fifth, apply a repair that ends the chain. In the probed repairs, requiring the inner type instead of the wrapped type - with a direct impl for a concrete base type - compiled and printed has Foo for a doubly wrapped value, and implementing the trait for the concrete wrapped type only also compiled and printed has Foo. For a circular shape, give at least one type a direct impl that does not route through the circle.
Last, leave the working shapes alone: a program whose impls shrink toward a base case, and a program with direct concrete impls, compile in the probed shapes. Do not reintroduce a where clause that mentions the wrapped type, or an impl that derives a trait from the trait it implements, while fixing the overflow next to them.
Decision summary
E0275 fired for every recursive-requirement shape probed that was actually evaluated: the index example's blanket impl (exactly one E0275, on the impl's where clause, with no other error alongside it, and with no use anywhere in the program), the same blanket impl used from a function bound (two E0275 errors in the probed shape, one on the impl and one on the function bound, whether the call passed a plain or a wrapped value), a wrapper impl whose where clause requires Bar<Bar<T>>: Foo (exactly one E0275, on the where clause), an impl of Foo for Bar<T> whose where clause requires Bar<T>: Foo itself (exactly one E0275, at the call site, for the concrete requirement Bar<i32>: Foo), and two traits whose blanket impls require each other (exactly one E0275, at the call site, for the concrete requirement i32: A). It fired again for the index example with the recursion limit raised to 256, with 254 redundant requirements hidden instead of 126. It did not fire for the self-referential impl or the two-traits circle when never used - both compiled and printed hi with dead-code warnings only in the probed shapes - for a recursive associated type over a type with no base impl, which drew E0277, for a missing impl with no recursion, which drew E0277, or for a recursive struct with no indirection, which drew E0072 alone. The shapes that compiled and ran were the shrinking-bound repair with a concrete base impl (printing has Foo for a doubly wrapped value, in both its where-clause and type-parameter-bound forms) and the concrete-impl repair (printing has Foo).
Checklist
- Growing or repeating, never ending: in the probed shapes, E0275 fires when a requirement is answered only by asking about a bigger type -
Bar<T>forT,Bar<Bar<T>>forBar<T>- or by asking the same question again -Bar<T>: FooforBar<T>: Foo,i32: Athroughi32: B- with no direct impl to stop at. - The header tells you which kind: a wrapped tower with 126 redundant requirements hidden marks a growing requirement in the probed shapes; the concrete requirement itself -
Bar<i32>: Foo,i32: A- marks a circular one. - The span tells you when it was found: on the impl's where clause for the growing shapes probed, because the impl itself is checked; on the call in
mainfor the circular shapes probed, because nothing overflows until a concrete type is checked. - An unused circle is silent: the self-referential impl and the two-traits circle compile with dead-code warnings only when never used in the probed shapes - removing the failing call hides the error without repairing the impl.
- The recursion limit is not the repair for a growing requirement: the index example with the limit raised to 256 drew E0275 again in the probed shape, with the help suggesting 512 and 254 redundant requirements hidden instead of 126.
- Not every recursion is E0275: a recursive associated type over a type with no base impl and a missing impl with no recursion draw E0277 in the probed shapes, and a recursive struct with no indirection draws E0072.
- The repairs in the probed shapes: require the inner type instead of the wrapped type, with a direct impl for a concrete base type - or implement the trait for the concrete types only - and give a circular shape at least one direct impl that does not route through the circle.
Sources
- Rust error codes index, E0275 - an evaluation of a trait requirement overflowed; the erroneous example is a blanket impl of Foo for every T with the requirement Bar
: Foo; the page advises considering changing trait bounds so they are less self-referential. - Rust error codes index, E0277 - the trait bound is not satisfied; the code drawn in the probed shapes by a recursive associated type over a type with no base impl, and by a missing impl with no recursion.
- Rust error codes index, E0072 - a recursive type has infinite size; the code drawn alone in the probed shape by a struct that contains itself directly with no indirection.
Keep Exploring
The full Rust hub \u2014 ownership, structs and enums, async, and measured comparisons.
Every guide on the site in one list, grouped by topic.
Every browser-only checker and verifier on the site.
The C++, Python, Sysadmin, Rust, Go, and TypeScript hubs.