mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
20 lines
421 B
Rust
20 lines
421 B
Rust
// skip-filecheck
|
|
//@ test-mir-pass: CopyProp
|
|
// Verify that we do not ICE on partial initializations.
|
|
|
|
#![feature(custom_mir, core_intrinsics)]
|
|
extern crate core;
|
|
use core::intrinsics::mir::*;
|
|
|
|
// EMIT_MIR partial_init.main.CopyProp.diff
|
|
#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
|
|
pub fn main() {
|
|
mir! (
|
|
let x: (isize, );
|
|
{
|
|
x.0 = 1;
|
|
Return()
|
|
}
|
|
)
|
|
}
|