Skip to content

Commit

Permalink
No field assignment for the moment.
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbolliger committed Mar 4, 2021
1 parent ec490c8 commit 19ed194
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions stainless_frontend/tests/pass/mut_local_lets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ pub enum IntOption {
Some(i32),
}

struct S {
field: i32,
}

pub fn main() {
// Local mutation is ok.
let mut x = 1;
Expand All @@ -24,10 +20,4 @@ pub fn main() {
let mut option = IntOption::None;
option2 = option;
option = IntOption::Some(123);

// field assignment
let mut s = S { field: 123 };
assert!(s.field == 123);
s.field = 456;
assert!(s.field == 456);
}

0 comments on commit 19ed194

Please sign in to comment.