Sisu
E0080

_ used as a name

Error

Built from the repository at commit a8614dc.

A function, class, field or parameter cannot be named _.

Why

_ is reserved for let _ and for _, where it binds nothing. A function, class, field or parameter named _ could never be used, because _ is not a value. The compiler cannot know which name was meant, so there is no fix.

Broken

fn _() {
    print(1)
}

fn main() {
}

What sisu says

error[E0080]: `_` cannot be a name
 --> E0080.sisu:1:4
  |
1 | fn _() {
  |    ^

sisu: 1 error
sisu: for more on a code, run `sisu explain <code>`: E0080

Fixed

fn helper() {
    print(1)
}

fn main() {
    helper()
}

Related

  • E0079: _ used as a value.