Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#52834 - matthewjasper:allow-zst-conflicts, …
…r=pnkfelix [NLL] Allow conflicting borrows of promoted length zero arrays This is currently overkill as there's no way to create two conflicting borrows of any promoted. It is possible that the following code might not fail due to const eval in the future (@oli-obk?). In which case either the array marked needs to not be promoted, or to be checked for conflicts ```rust static mut A: () = { let mut y = None; let z; let mut done_y = false; loop { let x = &mut [1]; // < this array if done_y { z = x; break; } y = Some(x); done_y = true; } some_const_fn(y, z); // some_const_fn expects that y to not alias z. }; ``` r? @pnkfelix @nikomatsakis closes rust-lang#52671 cc rust-lang#51823
- Loading branch information