Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
jfecher committed Oct 9, 2023
1 parent a4c6d70 commit 9fa02c9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "mutability_regression_3008"
type = "bin"
authors = [""]
compiler_version = "0.9.0"

[dependencies]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Expect 'Variable must be mutable to be assigned to' error
fn main() {
let slice : &mut [Field] = &mut [];
slice = &mut (*slice).push_back(1);
}

0 comments on commit 9fa02c9

Please sign in to comment.