Skip to content

Commit

Permalink
add testcase for rust-lang#79152
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Nov 25, 2020
1 parent 773ddba commit 3479fc6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/test/ui/const_fn_vec_mutation_79152.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// check-pass

// https://github.com/rust-lang/rust/issues/79152
const fn foo() {
let mut array = [[0; 1]; 1];
array[0][0] = 1;
}

pub fn main() {
foo()
}

0 comments on commit 3479fc6

Please sign in to comment.