]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/const-eval/issue-65394.rs
Auto merge of #66384 - cjgillot:typefoldable, r=Zoxc
[rust.git] / src / test / ui / consts / const-eval / issue-65394.rs
1 // Test for absence of validation mismatch ICE in #65394
2
3 const _: Vec<i32> = {
4     let mut x = Vec::<i32>::new();
5     let r = &mut x; //~ ERROR references in constants may only refer to immutable values
6     let y = x;
7     y
8 };
9
10 fn main() {}