docs

You are reading the docs for v0.1.2. Nabi 0.1.2 is no longer supported. Latest release: v0.1.3 →

#E0095: type too large

A value type is larger than the compiler handles. Hold the large part through a reference type such as List.

nabi
struct W<T> { a: T; b: T; }

let x: W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<i64>>>>>>>>>>>>>>>>>>>>>>>>>>> = panic("unreachable");
error[E0095]: value type `W<..>` is too large (131071 scalar slots, ~1048568 bytes; the limit is 65536 slots / 4294967296 bytes)
  --> main.nabi:3:30
   |
 3 | let x: W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<W<i64>>>>>>>>>>>>>>>>>>>>>>>>>>> = panic("unreachable");
   |                              ^

Hold the large part through a reference type, such as a List of the inner values or a struct of your own that holds one.

Related: E0080 definition depends on itself, E0093 generic instantiation too deep

Found a mistake? Edit this page on GitHub. Last updated