Error codes

E0107: duplicate definition

In a terminal: auk explain E0107 prints this page.

On this page

The same name is defined twice in one module (a type, a constant), or a struct has two fields or an enum two variants with the same name. Built-in type names can't be redefined either.

Wrong#

auk
struct Point { x: int, x: int }

Fixed#

auk
struct Point { x: int, y: int }

Common causes#

  • A copy-pasted field or variant that wasn't renamed.
  • Two structs or enums with the same name in one file.
  • A type named str, int or another built-in.

Stuck on a word? Try the glossary. Got a compiler error? Look up its code. Improve this page