# E0162

`pub` on a trait method. A trait method takes its visibility from the trait.

**Machine-applicable fix:** Remove `pub`.

## Example

This program fails with `E0162`.

```oska
trait Show {
    pub fn show(self) -> String
}
```

## Fixed

The same program, fixed.

```oska
trait Show {
    fn show(self) -> String
}
```

Listed in the [checker notes](/checker.md#e0162). `oskac explain E0162` prints this entry offline.