rust/tests/ui/error-codes/E0594.rs

6 lines
106 B
Rust

static NUM: i32 = 18;
fn main() {
NUM = 20; //~ ERROR cannot assign to immutable static item `NUM`
}