E0291
An inherent impl for a prelude type, such as impl FsRead { ... }: only the prelude declares methods on its types. Write a free function, or implement a trait. Spans the impl's type.
Machine-applicable fix: none.
Example
This program fails with E0291.
impl FsRead {
fn size(self) -> Int {
1
}
}
Fixed
The same program, fixed.
fn size(fs: FsRead) -> Int {
1
}
Listed in the checker notes. oskac explain E0291 prints this entry offline.