Skip to content
ZOLO / TE480 Type · error

associated type does not satisfy its declared bound

An implementation selected a concrete associated type that does not satisfy a bound the trait declared for it. The diagnostic names the implementation, the projected associated type, and the failed requirement — the original type is preserved, never silently widened to `Any`.

Why this fires

An implementation selected a concrete associated type that does not satisfy a bound declared by the trait.

trait Source {
    type Item: Ord
}

struct Callback {}
impl Source for Callback {
    type Item = fn(int) -> int
    //   ^ error[TE480]: function does not implement Ord
}

The diagnostic names the implementation, the projected associated type, and the failed requirement. The original type is preserved; it is never replaced with Any merely to make the impl pass.

Fix it

Choose an associated type that implements every declared bound, or remove a bound from the trait only when consumers genuinely do not need that capability.

See also

  • TE481 — required associated type is missing.
  • TE482 — trait arguments select an incompatible witness.
  • specs/gradual-type-precision.html.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

enespt-br