Docs menu

E129: There is nothing to work the type out from

What compiler error E129 means, and how to fix it.

guess means “use whatever type the value on the right has”. That only works when the value has a real type to offer. Turf found one that doesn’t:

Example
mut a: guess = null;              // `null` could be a reference to anythingmut b: guess = print_it();        // print_it() returns void: no value, no typemut c: guess = List::default();   // which kind of List?

Say the type yourself, the same way you would without guess, or, for a generic struct, where the value is built:

Example
mut a: &?Point = null;mut c: List<int> = List::default();mut d = List<int>::default();     // the same List<int>

When a constructor’s arguments decide the type arguments (mut b = Box::new(42);, a Box<int>), the compiler prints that one as a fix: Box<int>::new(42).

For the void case, the real problem is usually that the function was supposed to return something. Call it as a statement on its own if you only want what it does:

Example
print_it();

The same error is reported at a generic function whose type parameter no parameter mentions. Every type parameter has to appear in a parameter, so a call can always work it out from its arguments; T here appears in none:

Example
fn<T> make(): T { ... }           // which T would `make()` be?

Use the type parameter in a parameter (fn<T> make(seed: T): T), or drop it and name a real type.

Run turf --explain E129 in a terminal to read this again.

Last updated: Oct 15, 2026Edit this page on GitHub

Esc

Type to search.