rust/tests/ui/nll/polonius/array-literal-index-oob-2024.rs
2025-08-08 15:14:51 +00:00

13 lines
365 B
Rust

// This test used to ICE under `-Zpolonius=next` when computing loan liveness
// and taking kills into account during reachability traversal of the localized
// constraint graph. Originally from another test but on edition 2024, as
// seen in issue #135646.
//@ compile-flags: -Zpolonius=next
//@ edition: 2024
//@ check-pass
fn main() {
&{ [1, 2, 3][4] };
}