E3040

E3040 — I::Item where no impl for what I is binds an associated type named Item: I has no such bound, or the name is misspelled.

What the compiler reports

E3040 … `I::Itme` does not resolve, because no impl for `Range` binds an associated type named 'Itme'

The fragments the test suite holds the compiler to. An ellipsis marks text the test does not constrain; the emitted message also carries a source location.

A program that triggers it

import core::iter;

fn first<I : Iterator>(it : I) -> Option<I::Itme> {
  let mut i = it;
  return i.next();
}

fn main() -> i32 {
  let v = first(range(0i64, 5i64));
  return 0;
}

From tests/frontend/fail/projection_does_not_resolve.vx, which asserts this diagnostic on every commit.

Related