E0260

A method called on a value of a generic parameter whose bounds provide no method of that name. A generic body is checked once, against its bounds only. Spans the method name.

Machine-applicable fix: Add the bound, when exactly one trait has the method.

Example

This program fails with E0260.

trait Measure {
    fn size(self) -> Int
}

fn total<T>(x: T) -> Int {
    x.size()
}

Fixed

The same program, fixed.

trait Measure {
    fn size(self) -> Int
}

fn total<T: Measure>(x: T) -> Int {
    x.size()
}

Listed in the checker notes. oskac explain E0260 prints this entry offline.

All error codes