FileCheck bad_op_unsafe_oob_for_slices. · rust-lang/rust@e8e35c8 (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit e8e35c8
FileCheck bad_op_unsafe_oob_for_slices.
File tree
1 file changed
lines changed
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
1 | -// skip-filecheck | |
2 | 1 | // unit-test: ConstProp |
3 | 2 | // EMIT_MIR_FOR_EACH_PANIC_STRATEGY |
4 | 3 | // EMIT_MIR_FOR_EACH_BIT_WIDTH |
5 | 4 | |
6 | 5 | // EMIT_MIR bad_op_unsafe_oob_for_slices.main.ConstProp.diff |
7 | 6 | #[allow(unconditional_panic)] |
8 | 7 | fn main() { |
8 | +// CHECK-LABEL: fn main( | |
9 | +// CHECK: debug a => [[a:_.*]]; | |
10 | +// CHECK: debug _b => [[b:_.*]]; | |
11 | +// CHECK: [[b]] = (*[[a]])[3 of 4]; | |
9 | 12 | let a: *const [_] = &[1, 2, 3]; |
10 | 13 | unsafe { |
11 | 14 | let _b = (*a)[3]; |