E0151

pub on an impl block. Mark its methods pub instead.

Machine-applicable fix: Remove pub.

Example

This program fails with E0151.

struct Box { n: Int }

pub impl Box {
    fn size(self) -> Int {
        1
    }
}

Fixed

The same program, fixed.

struct Box { n: Int }

impl Box {
    pub fn size(self) -> Int {
        1
    }
}

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

All error codes