fc6b7c8b38
Long lines were fixed in a very crude way, as I'll be following up with another reformat in a bit.
10 lines
192 B
Rust
10 lines
192 B
Rust
// -*- rust -*-
|
|
|
|
// error-pattern:assigning to immutable field
|
|
|
|
type point = {x: int, y: int, z: int};
|
|
|
|
fn f(p: point) { p.x = 13; }
|
|
|
|
fn main() { let x: point = {x: 10, y: 11, z: 12}; f(x); }
|