Docs menu

E061: The left side of your assignment isn't something you can actually assign to

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

= needs somewhere real to put the value – a variable, a struct field, or a slot in an array. Those three are the only things Turf will let you write on the left side of an assignment.

All three of these are valid targets:

Example
mut x: int = 5;x = 10;                 // a variablemut p: Point = Point::default();p.x = 10;                // a struct fieldmut arr: int[3] = [1, 2, 3];arr[0] = 10;             // an array element

This isn’t valid, because true is a fixed value, not a place to store something:

Example
true = 5;

Neither is this, because (x + 1) is a computed result, not a variable you can point at and overwrite:

Example
(x + 1) = 5;

Turf tells you exactly what was on the left side that it couldn’t accept.

This error is almost always a sign of a typo or a mixed-up line – maybe you meant to compare with == instead of assign with =, or you meant to assign to a variable but accidentally wrote an expression instead. Take a second look at what’s actually on the left of the = and make sure it’s a genuine variable, field, or array slot.

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

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

Esc

Type to search.