Error codes

E0106: wrong number of type arguments

In a terminal: auk explain E0106 prints this page.

On this page

A generic type was given the wrong number of type arguments, or a non-generic type was given some. Set<T> takes one; int takes none.

Wrong#

auk
struct Box<T> { v: T }
fn get(b: Box<int, str>): int = b.v

Fixed#

auk
struct Box<T> { v: T }
fn get(b: Box<int>): int = b.v

Common causes#

  • Extra or missing arguments to a generic struct or enum.
  • Type arguments on a plain type: str<char>.
  • A map written Map<K, V>: Auk writes {K: V}.

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