Allow to run filecheck in mir-opt tests.
This commit is contained in:
parent
c104861b7b
commit
4ff03cd1a4
324 changed files with 515 additions and 240 deletions
|
@ -15,6 +15,7 @@ use crate::json;
|
|||
use crate::read2::{read2_abbreviated, Truncated};
|
||||
use crate::util::{add_dylib_path, dylib_env_var, logv, PathBufExt};
|
||||
use crate::ColorConfig;
|
||||
use miropt_test_tools::{files_for_miropt_test, MiroptTest, MiroptTestFile};
|
||||
use regex::{Captures, Regex};
|
||||
use rustfix::{apply_suggestions, get_suggestions_from_json, Filter};
|
||||
|
||||
|
@ -229,6 +230,7 @@ enum Emit {
|
|||
None,
|
||||
Metadata,
|
||||
LlvmIr,
|
||||
Mir,
|
||||
Asm,
|
||||
LinkArgsAsm,
|
||||
}
|
||||
|
@ -2506,6 +2508,9 @@ impl<'test> TestCx<'test> {
|
|||
Emit::LlvmIr => {
|
||||
rustc.args(&["--emit", "llvm-ir"]);
|
||||
}
|
||||
Emit::Mir => {
|
||||
rustc.args(&["--emit", "mir"]);
|
||||
}
|
||||
Emit::Asm => {
|
||||
rustc.args(&["--emit", "asm"]);
|
||||
}
|
||||
|
@ -3984,11 +3989,17 @@ impl<'test> TestCx<'test> {
|
|||
fn run_mir_opt_test(&self) {
|
||||
let pm = self.pass_mode();
|
||||
let should_run = self.should_run(pm);
|
||||
let emit_metadata = self.should_emit_metadata(pm);
|
||||
let passes = self.get_passes();
|
||||
|
||||
let proc_res = self.compile_test_with_passes(should_run, emit_metadata, passes);
|
||||
self.check_mir_dump();
|
||||
let mut test_info = files_for_miropt_test(
|
||||
&self.testpaths.file,
|
||||
self.config.get_pointer_width(),
|
||||
self.config.target_cfg().panic.for_miropt_test_tools(),
|
||||
);
|
||||
|
||||
let passes = std::mem::take(&mut test_info.passes);
|
||||
|
||||
let proc_res = self.compile_test_with_passes(should_run, Emit::Mir, passes);
|
||||
self.check_mir_dump(test_info);
|
||||
if !proc_res.status.success() {
|
||||
self.fatal_proc_rec("compilation failed!", &proc_res);
|
||||
}
|
||||
|
@ -4002,37 +4013,12 @@ impl<'test> TestCx<'test> {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_passes(&self) -> Vec<String> {
|
||||
let files = miropt_test_tools::files_for_miropt_test(
|
||||
&self.testpaths.file,
|
||||
self.config.get_pointer_width(),
|
||||
self.config.target_cfg().panic.for_miropt_test_tools(),
|
||||
);
|
||||
|
||||
let mut out = Vec::new();
|
||||
|
||||
for miropt_test_tools::MiroptTestFiles {
|
||||
from_file: _,
|
||||
to_file: _,
|
||||
expected_file: _,
|
||||
passes,
|
||||
} in files
|
||||
{
|
||||
out.extend(passes);
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
fn check_mir_dump(&self) {
|
||||
fn check_mir_dump(&self, test_info: MiroptTest) {
|
||||
let test_dir = self.testpaths.file.parent().unwrap();
|
||||
let test_crate =
|
||||
self.testpaths.file.file_stem().unwrap().to_str().unwrap().replace("-", "_");
|
||||
|
||||
let suffix = miropt_test_tools::output_file_suffix(
|
||||
&self.testpaths.file,
|
||||
self.config.get_pointer_width(),
|
||||
self.config.target_cfg().panic.for_miropt_test_tools(),
|
||||
);
|
||||
let MiroptTest { run_filecheck, suffix, files, passes: _ } = test_info;
|
||||
|
||||
if self.config.bless {
|
||||
for e in
|
||||
|
@ -4047,14 +4033,7 @@ impl<'test> TestCx<'test> {
|
|||
}
|
||||
}
|
||||
|
||||
let files = miropt_test_tools::files_for_miropt_test(
|
||||
&self.testpaths.file,
|
||||
self.config.get_pointer_width(),
|
||||
self.config.target_cfg().panic.for_miropt_test_tools(),
|
||||
);
|
||||
for miropt_test_tools::MiroptTestFiles { from_file, to_file, expected_file, passes: _ } in
|
||||
files
|
||||
{
|
||||
for MiroptTestFile { from_file, to_file, expected_file } in files {
|
||||
let dumped_string = if let Some(after) = to_file {
|
||||
self.diff_mir_files(from_file.into(), after.into())
|
||||
} else {
|
||||
|
@ -4095,6 +4074,14 @@ impl<'test> TestCx<'test> {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if run_filecheck {
|
||||
let output_path = self.output_base_name().with_extension("mir");
|
||||
let proc_res = self.verify_with_filecheck(&output_path);
|
||||
if !proc_res.status.success() {
|
||||
self.fatal_proc_rec("verification with 'FileCheck' failed", &proc_res);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn diff_mir_files(&self, before: PathBuf, after: PathBuf) -> String {
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
use std::fs;
|
||||
use std::path::Path;
|
||||
|
||||
pub struct MiroptTestFiles {
|
||||
pub struct MiroptTestFile {
|
||||
pub expected_file: std::path::PathBuf,
|
||||
pub from_file: String,
|
||||
pub to_file: Option<String>,
|
||||
}
|
||||
|
||||
pub struct MiroptTest {
|
||||
pub run_filecheck: bool,
|
||||
pub suffix: String,
|
||||
pub files: Vec<MiroptTestFile>,
|
||||
/// Vec of passes under test to be dumped
|
||||
pub passes: Vec<String>,
|
||||
}
|
||||
|
@ -14,11 +20,7 @@ pub enum PanicStrategy {
|
|||
Abort,
|
||||
}
|
||||
|
||||
pub fn output_file_suffix(
|
||||
testfile: &Path,
|
||||
bit_width: u32,
|
||||
panic_strategy: PanicStrategy,
|
||||
) -> String {
|
||||
fn output_file_suffix(testfile: &Path, bit_width: u32, panic_strategy: PanicStrategy) -> String {
|
||||
let mut each_bit_width = false;
|
||||
let mut each_panic_strategy = false;
|
||||
for line in fs::read_to_string(testfile).unwrap().lines() {
|
||||
|
@ -47,7 +49,7 @@ pub fn files_for_miropt_test(
|
|||
testfile: &std::path::Path,
|
||||
bit_width: u32,
|
||||
panic_strategy: PanicStrategy,
|
||||
) -> Vec<MiroptTestFiles> {
|
||||
) -> MiroptTest {
|
||||
let mut out = Vec::new();
|
||||
let test_file_contents = fs::read_to_string(&testfile).unwrap();
|
||||
|
||||
|
@ -55,8 +57,14 @@ pub fn files_for_miropt_test(
|
|||
let test_crate = testfile.file_stem().unwrap().to_str().unwrap().replace('-', "_");
|
||||
|
||||
let suffix = output_file_suffix(testfile, bit_width, panic_strategy);
|
||||
let mut run_filecheck = true;
|
||||
let mut passes = Vec::new();
|
||||
|
||||
for l in test_file_contents.lines() {
|
||||
if l.starts_with("// skip-filecheck") {
|
||||
run_filecheck = false;
|
||||
continue;
|
||||
}
|
||||
if l.starts_with("// EMIT_MIR ") {
|
||||
let test_name = l.trim_start_matches("// EMIT_MIR ").trim();
|
||||
let mut test_names = test_name.split(' ');
|
||||
|
@ -65,7 +73,6 @@ pub fn files_for_miropt_test(
|
|||
let mut expected_file;
|
||||
let from_file;
|
||||
let to_file;
|
||||
let mut passes = Vec::new();
|
||||
|
||||
if test_name.ends_with(".diff") {
|
||||
let trimmed = test_name.trim_end_matches(".diff");
|
||||
|
@ -114,9 +121,9 @@ pub fn files_for_miropt_test(
|
|||
}
|
||||
let expected_file = test_dir.join(expected_file);
|
||||
|
||||
out.push(MiroptTestFiles { expected_file, from_file, to_file, passes });
|
||||
out.push(MiroptTestFile { expected_file, from_file, to_file });
|
||||
}
|
||||
}
|
||||
|
||||
out
|
||||
MiroptTest { run_filecheck, suffix, files: out, passes }
|
||||
}
|
||||
|
|
|
@ -26,7 +26,8 @@ fn check_unused_files(path: &Path, bless: bool, bad: &mut bool) {
|
|||
for file in rs_files {
|
||||
for bw in [32, 64] {
|
||||
for ps in [PanicStrategy::Unwind, PanicStrategy::Abort] {
|
||||
for output_file in miropt_test_tools::files_for_miropt_test(&file, bw, ps) {
|
||||
let mir_opt_test = miropt_test_tools::files_for_miropt_test(&file, bw, ps);
|
||||
for output_file in mir_opt_test.files {
|
||||
output_files.remove(&output_file.expected_file);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,36 +1,36 @@
|
|||
// MIR for `address_of_reborrow` after SimplifyCfg-initial
|
||||
|
||||
| User Type Annotations
|
||||
| 0: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:7:5: 7:18, inferred_ty: *const [i32; 10]
|
||||
| 1: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:9:5: 9:25, inferred_ty: *const dyn std::marker::Send
|
||||
| 2: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:13:12: 13:20, inferred_ty: *const [i32; 10]
|
||||
| 3: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:13:12: 13:20, inferred_ty: *const [i32; 10]
|
||||
| 4: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:14:12: 14:28, inferred_ty: *const [i32; 10]
|
||||
| 5: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:14:12: 14:28, inferred_ty: *const [i32; 10]
|
||||
| 6: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:15:12: 15:27, inferred_ty: *const dyn std::marker::Send
|
||||
| 7: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:15:12: 15:27, inferred_ty: *const dyn std::marker::Send
|
||||
| 8: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:16:12: 16:24, inferred_ty: *const [i32]
|
||||
| 9: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:16:12: 16:24, inferred_ty: *const [i32]
|
||||
| 10: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:18:5: 18:18, inferred_ty: *const [i32; 10]
|
||||
| 11: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:20:5: 20:25, inferred_ty: *const dyn std::marker::Send
|
||||
| 12: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:23:12: 23:20, inferred_ty: *const [i32; 10]
|
||||
| 13: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:23:12: 23:20, inferred_ty: *const [i32; 10]
|
||||
| 14: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:24:12: 24:28, inferred_ty: *const [i32; 10]
|
||||
| 15: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:24:12: 24:28, inferred_ty: *const [i32; 10]
|
||||
| 16: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:25:12: 25:27, inferred_ty: *const dyn std::marker::Send
|
||||
| 17: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:25:12: 25:27, inferred_ty: *const dyn std::marker::Send
|
||||
| 18: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:26:12: 26:24, inferred_ty: *const [i32]
|
||||
| 19: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:26:12: 26:24, inferred_ty: *const [i32]
|
||||
| 20: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:28:5: 28:16, inferred_ty: *mut [i32; 10]
|
||||
| 21: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:30:5: 30:23, inferred_ty: *mut dyn std::marker::Send
|
||||
| 22: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:33:12: 33:18, inferred_ty: *mut [i32; 10]
|
||||
| 23: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:33:12: 33:18, inferred_ty: *mut [i32; 10]
|
||||
| 24: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:34:12: 34:26, inferred_ty: *mut [i32; 10]
|
||||
| 25: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:34:12: 34:26, inferred_ty: *mut [i32; 10]
|
||||
| 26: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:35:12: 35:25, inferred_ty: *mut dyn std::marker::Send
|
||||
| 27: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:35:12: 35:25, inferred_ty: *mut dyn std::marker::Send
|
||||
| 28: user_ty: Canonical { value: Ty(*mut [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:36:12: 36:22, inferred_ty: *mut [i32]
|
||||
| 29: user_ty: Canonical { value: Ty(*mut [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:36:12: 36:22, inferred_ty: *mut [i32]
|
||||
| 0: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:8:5: 8:18, inferred_ty: *const [i32; 10]
|
||||
| 1: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:10:5: 10:25, inferred_ty: *const dyn std::marker::Send
|
||||
| 2: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:14:12: 14:20, inferred_ty: *const [i32; 10]
|
||||
| 3: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:14:12: 14:20, inferred_ty: *const [i32; 10]
|
||||
| 4: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:15:12: 15:28, inferred_ty: *const [i32; 10]
|
||||
| 5: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:15:12: 15:28, inferred_ty: *const [i32; 10]
|
||||
| 6: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:16:12: 16:27, inferred_ty: *const dyn std::marker::Send
|
||||
| 7: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:16:12: 16:27, inferred_ty: *const dyn std::marker::Send
|
||||
| 8: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:17:12: 17:24, inferred_ty: *const [i32]
|
||||
| 9: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:17:12: 17:24, inferred_ty: *const [i32]
|
||||
| 10: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:19:5: 19:18, inferred_ty: *const [i32; 10]
|
||||
| 11: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:21:5: 21:25, inferred_ty: *const dyn std::marker::Send
|
||||
| 12: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:24:12: 24:20, inferred_ty: *const [i32; 10]
|
||||
| 13: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:24:12: 24:20, inferred_ty: *const [i32; 10]
|
||||
| 14: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:25:12: 25:28, inferred_ty: *const [i32; 10]
|
||||
| 15: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:25:12: 25:28, inferred_ty: *const [i32; 10]
|
||||
| 16: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:26:12: 26:27, inferred_ty: *const dyn std::marker::Send
|
||||
| 17: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:26:12: 26:27, inferred_ty: *const dyn std::marker::Send
|
||||
| 18: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:27:12: 27:24, inferred_ty: *const [i32]
|
||||
| 19: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:27:12: 27:24, inferred_ty: *const [i32]
|
||||
| 20: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:29:5: 29:16, inferred_ty: *mut [i32; 10]
|
||||
| 21: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:31:5: 31:23, inferred_ty: *mut dyn std::marker::Send
|
||||
| 22: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:34:12: 34:18, inferred_ty: *mut [i32; 10]
|
||||
| 23: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:34:12: 34:18, inferred_ty: *mut [i32; 10]
|
||||
| 24: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:35:12: 35:26, inferred_ty: *mut [i32; 10]
|
||||
| 25: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:35:12: 35:26, inferred_ty: *mut [i32; 10]
|
||||
| 26: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:36:12: 36:25, inferred_ty: *mut dyn std::marker::Send
|
||||
| 27: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:36:12: 36:25, inferred_ty: *mut dyn std::marker::Send
|
||||
| 28: user_ty: Canonical { value: Ty(*mut [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:37:12: 37:22, inferred_ty: *mut [i32]
|
||||
| 29: user_ty: Canonical { value: Ty(*mut [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:37:12: 37:22, inferred_ty: *mut [i32]
|
||||
|
|
||||
fn address_of_reborrow() -> () {
|
||||
let mut _0: ();
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
|
||||
|
||||
fn address_of_reborrow() {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// Retagging (from Stacked Borrows) relies on the array index being a fresh
|
||||
// temporary, so that side-effects cannot change it.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
//! Tests that unwinding from an asm block is caught and forced to abort
|
||||
//! when `-C panic=abort`.
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// MIR for `main` after SimplifyCfg-initial
|
||||
|
||||
| User Type Annotations
|
||||
| 0: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:20:17: 20:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
|
||||
| 1: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:20:17: 20:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
|
||||
| 0: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:21:17: 21:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
|
||||
| 1: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:21:17: 21:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
|
||||
|
|
||||
fn main() -> () {
|
||||
let mut _0: ();
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// needs-unwind
|
||||
// this tests move up progration, which is not yet implemented
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: InstSimplify
|
||||
|
||||
// EMIT_MIR bool_compare.opt1.InstSimplify.diff
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
|
||||
#![feature(rustc_attrs, stmt_expr_attributes)]
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
storage_conflicts: BitMatrix(0x0) {},
|
||||
} */
|
||||
|
||||
fn a::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>, _2: &mut Context<'_>) -> Poll<()> {
|
||||
fn a::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:12:14: 12:16}>, _2: &mut Context<'_>) -> Poll<()> {
|
||||
debug _task_context => _4;
|
||||
let mut _0: std::task::Poll<()>;
|
||||
let mut _3: ();
|
||||
|
@ -17,7 +17,7 @@ fn a::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>
|
|||
let mut _5: u32;
|
||||
|
||||
bb0: {
|
||||
_5 = discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16})));
|
||||
_5 = discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16})));
|
||||
switchInt(move _5) -> [0: bb1, 1: bb4, otherwise: bb5];
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ fn a::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>
|
|||
|
||||
bb2: {
|
||||
_0 = Poll::<()>::Ready(move _3);
|
||||
discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16}))) = 1;
|
||||
discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16}))) = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
Static,
|
||||
),
|
||||
source_info: SourceInfo {
|
||||
span: $DIR/async_await.rs:15:9: 15:14 (#8),
|
||||
span: $DIR/async_await.rs:16:9: 16:14 (#8),
|
||||
scope: scope[0],
|
||||
},
|
||||
ignore_for_traits: false,
|
||||
|
@ -32,7 +32,7 @@
|
|||
Static,
|
||||
),
|
||||
source_info: SourceInfo {
|
||||
span: $DIR/async_await.rs:16:9: 16:14 (#10),
|
||||
span: $DIR/async_await.rs:17:9: 17:14 (#10),
|
||||
scope: scope[0],
|
||||
},
|
||||
ignore_for_traits: false,
|
||||
|
@ -51,19 +51,19 @@
|
|||
},
|
||||
} */
|
||||
|
||||
fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>, _2: &mut Context<'_>) -> Poll<()> {
|
||||
fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:15:18: 18:2}>, _2: &mut Context<'_>) -> Poll<()> {
|
||||
debug _task_context => _38;
|
||||
let mut _0: std::task::Poll<()>;
|
||||
let _3: ();
|
||||
let mut _4: {async fn body@$DIR/async_await.rs:11:14: 11:16};
|
||||
let mut _5: {async fn body@$DIR/async_await.rs:11:14: 11:16};
|
||||
let mut _6: {async fn body@$DIR/async_await.rs:11:14: 11:16};
|
||||
let mut _4: {async fn body@$DIR/async_await.rs:12:14: 12:16};
|
||||
let mut _5: {async fn body@$DIR/async_await.rs:12:14: 12:16};
|
||||
let mut _6: {async fn body@$DIR/async_await.rs:12:14: 12:16};
|
||||
let mut _7: ();
|
||||
let _8: ();
|
||||
let mut _9: std::task::Poll<()>;
|
||||
let mut _10: std::pin::Pin<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>;
|
||||
let mut _11: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16};
|
||||
let mut _12: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16};
|
||||
let mut _10: std::pin::Pin<&mut {async fn body@$DIR/async_await.rs:12:14: 12:16}>;
|
||||
let mut _11: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16};
|
||||
let mut _12: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16};
|
||||
let mut _13: &mut std::task::Context<'_>;
|
||||
let mut _14: &mut std::task::Context<'_>;
|
||||
let mut _15: &mut std::task::Context<'_>;
|
||||
|
@ -71,14 +71,14 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
|
|||
let mut _18: !;
|
||||
let mut _19: &mut std::task::Context<'_>;
|
||||
let mut _20: ();
|
||||
let mut _21: {async fn body@$DIR/async_await.rs:11:14: 11:16};
|
||||
let mut _22: {async fn body@$DIR/async_await.rs:11:14: 11:16};
|
||||
let mut _23: {async fn body@$DIR/async_await.rs:11:14: 11:16};
|
||||
let mut _21: {async fn body@$DIR/async_await.rs:12:14: 12:16};
|
||||
let mut _22: {async fn body@$DIR/async_await.rs:12:14: 12:16};
|
||||
let mut _23: {async fn body@$DIR/async_await.rs:12:14: 12:16};
|
||||
let _24: ();
|
||||
let mut _25: std::task::Poll<()>;
|
||||
let mut _26: std::pin::Pin<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>;
|
||||
let mut _27: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16};
|
||||
let mut _28: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16};
|
||||
let mut _26: std::pin::Pin<&mut {async fn body@$DIR/async_await.rs:12:14: 12:16}>;
|
||||
let mut _27: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16};
|
||||
let mut _28: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16};
|
||||
let mut _29: &mut std::task::Context<'_>;
|
||||
let mut _30: &mut std::task::Context<'_>;
|
||||
let mut _31: &mut std::task::Context<'_>;
|
||||
|
@ -90,7 +90,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
|
|||
let mut _38: &mut std::task::Context<'_>;
|
||||
let mut _39: u32;
|
||||
scope 1 {
|
||||
debug __awaitee => (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:11:14: 11:16});
|
||||
debug __awaitee => (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:12:14: 12:16});
|
||||
let _17: ();
|
||||
scope 2 {
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
|
|||
}
|
||||
}
|
||||
scope 4 {
|
||||
debug __awaitee => (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:11:14: 11:16});
|
||||
debug __awaitee => (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:12:14: 12:16});
|
||||
let _33: ();
|
||||
scope 5 {
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
|
|||
}
|
||||
|
||||
bb0: {
|
||||
_39 = discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})));
|
||||
_39 = discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})));
|
||||
switchInt(move _39) -> [0: bb1, 1: bb29, 3: bb27, 4: bb28, otherwise: bb30];
|
||||
}
|
||||
|
||||
|
@ -122,13 +122,13 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
|
|||
}
|
||||
|
||||
bb2: {
|
||||
_4 = <{async fn body@$DIR/async_await.rs:11:14: 11:16} as IntoFuture>::into_future(move _5) -> [return: bb3, unwind unreachable];
|
||||
_4 = <{async fn body@$DIR/async_await.rs:12:14: 12:16} as IntoFuture>::into_future(move _5) -> [return: bb3, unwind unreachable];
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_5);
|
||||
nop;
|
||||
(((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:11:14: 11:16}) = move _4;
|
||||
(((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:12:14: 12:16}) = move _4;
|
||||
goto -> bb4;
|
||||
}
|
||||
|
||||
|
@ -138,9 +138,9 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
|
|||
StorageLive(_10);
|
||||
StorageLive(_11);
|
||||
StorageLive(_12);
|
||||
_12 = &mut (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:11:14: 11:16});
|
||||
_12 = &mut (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:12:14: 12:16});
|
||||
_11 = &mut (*_12);
|
||||
_10 = Pin::<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>::new_unchecked(move _11) -> [return: bb5, unwind unreachable];
|
||||
_10 = Pin::<&mut {async fn body@$DIR/async_await.rs:12:14: 12:16}>::new_unchecked(move _11) -> [return: bb5, unwind unreachable];
|
||||
}
|
||||
|
||||
bb5: {
|
||||
|
@ -156,7 +156,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
|
|||
bb6: {
|
||||
_13 = &mut (*_14);
|
||||
StorageDead(_15);
|
||||
_9 = <{async fn body@$DIR/async_await.rs:11:14: 11:16} as Future>::poll(move _10, move _13) -> [return: bb7, unwind unreachable];
|
||||
_9 = <{async fn body@$DIR/async_await.rs:12:14: 12:16} as Future>::poll(move _10, move _13) -> [return: bb7, unwind unreachable];
|
||||
}
|
||||
|
||||
bb7: {
|
||||
|
@ -176,7 +176,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
|
|||
StorageLive(_20);
|
||||
_20 = ();
|
||||
_0 = Poll::<()>::Pending;
|
||||
discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2}))) = 3;
|
||||
discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2}))) = 3;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -193,7 +193,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
|
|||
StorageDead(_12);
|
||||
StorageDead(_9);
|
||||
StorageDead(_8);
|
||||
drop((((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:11:14: 11:16})) -> [return: bb12, unwind unreachable];
|
||||
drop((((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:12:14: 12:16})) -> [return: bb12, unwind unreachable];
|
||||
}
|
||||
|
||||
bb11: {
|
||||
|
@ -218,13 +218,13 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
|
|||
}
|
||||
|
||||
bb14: {
|
||||
_21 = <{async fn body@$DIR/async_await.rs:11:14: 11:16} as IntoFuture>::into_future(move _22) -> [return: bb15, unwind unreachable];
|
||||
_21 = <{async fn body@$DIR/async_await.rs:12:14: 12:16} as IntoFuture>::into_future(move _22) -> [return: bb15, unwind unreachable];
|
||||
}
|
||||
|
||||
bb15: {
|
||||
StorageDead(_22);
|
||||
nop;
|
||||
(((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:11:14: 11:16}) = move _21;
|
||||
(((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:12:14: 12:16}) = move _21;
|
||||
goto -> bb16;
|
||||
}
|
||||
|
||||
|
@ -234,9 +234,9 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
|
|||
StorageLive(_26);
|
||||
StorageLive(_27);
|
||||
StorageLive(_28);
|
||||
_28 = &mut (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:11:14: 11:16});
|
||||
_28 = &mut (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:12:14: 12:16});
|
||||
_27 = &mut (*_28);
|
||||
_26 = Pin::<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>::new_unchecked(move _27) -> [return: bb17, unwind unreachable];
|
||||
_26 = Pin::<&mut {async fn body@$DIR/async_await.rs:12:14: 12:16}>::new_unchecked(move _27) -> [return: bb17, unwind unreachable];
|
||||
}
|
||||
|
||||
bb17: {
|
||||
|
@ -252,7 +252,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
|
|||
bb18: {
|
||||
_29 = &mut (*_30);
|
||||
StorageDead(_31);
|
||||
_25 = <{async fn body@$DIR/async_await.rs:11:14: 11:16} as Future>::poll(move _26, move _29) -> [return: bb19, unwind unreachable];
|
||||
_25 = <{async fn body@$DIR/async_await.rs:12:14: 12:16} as Future>::poll(move _26, move _29) -> [return: bb19, unwind unreachable];
|
||||
}
|
||||
|
||||
bb19: {
|
||||
|
@ -272,7 +272,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
|
|||
StorageLive(_36);
|
||||
_36 = ();
|
||||
_0 = Poll::<()>::Pending;
|
||||
discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2}))) = 4;
|
||||
discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2}))) = 4;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -285,7 +285,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
|
|||
StorageDead(_28);
|
||||
StorageDead(_25);
|
||||
StorageDead(_24);
|
||||
drop((((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:11:14: 11:16})) -> [return: bb23, unwind unreachable];
|
||||
drop((((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:12:14: 12:16})) -> [return: bb23, unwind unreachable];
|
||||
}
|
||||
|
||||
bb22: {
|
||||
|
@ -308,7 +308,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
|
|||
|
||||
bb25: {
|
||||
_0 = Poll::<()>::Ready(move _37);
|
||||
discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2}))) = 1;
|
||||
discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2}))) = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// This test makes sure that the generator MIR pass eliminates all calls to
|
||||
// `get_context`, and that the MIR argument type for an async fn and all locals
|
||||
// related to `yield` are `&mut Context`, and its return type is `Poll`.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
#![feature(custom_mir, core_intrinsics)]
|
||||
|
||||
extern crate core;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
#![feature(custom_mir, core_intrinsics)]
|
||||
|
||||
extern crate core;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
#![feature(custom_mir, core_intrinsics, inline_const)]
|
||||
|
||||
extern crate core;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
#![feature(custom_mir, core_intrinsics)]
|
||||
|
||||
extern crate core;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
#![feature(custom_mir, core_intrinsics)]
|
||||
|
||||
extern crate core;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
#![feature(custom_mir, core_intrinsics, inline_const)]
|
||||
|
||||
extern crate core;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
#![feature(custom_mir, core_intrinsics)]
|
||||
|
||||
extern crate core;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
#![feature(custom_mir, core_intrinsics)]
|
||||
|
||||
extern crate core;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// compile-flags: --crate-type=lib
|
||||
#![feature(custom_mir, core_intrinsics, inline_const)]
|
||||
use std::intrinsics::mir::*;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
#![feature(custom_mir, core_intrinsics)]
|
||||
|
||||
extern crate core;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
#![feature(custom_mir, core_intrinsics)]
|
||||
|
||||
extern crate core;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
#![feature(custom_mir, core_intrinsics)]
|
||||
|
||||
extern crate core;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
#![feature(custom_mir, core_intrinsics)]
|
||||
|
||||
extern crate core;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR enum_cast.foo.built.after.mir
|
||||
// EMIT_MIR enum_cast.bar.built.after.mir
|
||||
// EMIT_MIR enum_cast.boo.built.after.mir
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// MIR for `main` after built
|
||||
|
||||
| User Type Annotations
|
||||
| 0: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [] }, span: $DIR/issue_101867.rs:3:12: 3:22, inferred_ty: std::option::Option<u8>
|
||||
| 1: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [] }, span: $DIR/issue_101867.rs:3:12: 3:22, inferred_ty: std::option::Option<u8>
|
||||
| 0: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [] }, span: $DIR/issue_101867.rs:4:12: 4:22, inferred_ty: std::option::Option<u8>
|
||||
| 1: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [] }, span: $DIR/issue_101867.rs:4:12: 4:22, inferred_ty: std::option::Option<u8>
|
||||
|
|
||||
fn main() -> () {
|
||||
let mut _0: ();
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR issue_101867.main.built.after.mir
|
||||
fn main() {
|
||||
let x: Option<u8> = Some(1);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR issue_110508.{impl#0}-BAR.built.after.mir
|
||||
// EMIT_MIR issue_110508.{impl#0}-SELF_BAR.built.after.mir
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// MIR for `<impl at $DIR/issue_110508.rs:8:1: 8:9>::BAR` after built
|
||||
// MIR for `<impl at $DIR/issue_110508.rs:9:1: 9:9>::BAR` after built
|
||||
|
||||
const <impl at $DIR/issue_110508.rs:8:1: 8:9>::BAR: Foo = {
|
||||
const <impl at $DIR/issue_110508.rs:9:1: 9:9>::BAR: Foo = {
|
||||
let mut _0: Foo;
|
||||
let mut _1: ();
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// MIR for `<impl at $DIR/issue_110508.rs:8:1: 8:9>::SELF_BAR` after built
|
||||
// MIR for `<impl at $DIR/issue_110508.rs:9:1: 9:9>::SELF_BAR` after built
|
||||
|
||||
const <impl at $DIR/issue_110508.rs:8:1: 8:9>::SELF_BAR: Foo = {
|
||||
const <impl at $DIR/issue_110508.rs:9:1: 9:9>::SELF_BAR: Foo = {
|
||||
let mut _0: Foo;
|
||||
let mut _1: ();
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// We must mark a variable whose initialization fails due to an
|
||||
// abort statement as StorageDead.
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// compile-flags: -Z validate-mir
|
||||
#![feature(let_chains)]
|
||||
struct Droppy(u8);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
fn guard() -> bool {
|
||||
false
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// MIR for `main` after built
|
||||
|
||||
| User Type Annotations
|
||||
| 0: user_ty: Canonical { value: Ty(*mut Test), max_universe: U0, variables: [] }, span: $DIR/receiver_ptr_mutability.rs:14:14: 14:23, inferred_ty: *mut Test
|
||||
| 1: user_ty: Canonical { value: Ty(*mut Test), max_universe: U0, variables: [] }, span: $DIR/receiver_ptr_mutability.rs:14:14: 14:23, inferred_ty: *mut Test
|
||||
| 2: user_ty: Canonical { value: Ty(&&&&*mut Test), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/receiver_ptr_mutability.rs:18:18: 18:31, inferred_ty: &&&&*mut Test
|
||||
| 3: user_ty: Canonical { value: Ty(&&&&*mut Test), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/receiver_ptr_mutability.rs:18:18: 18:31, inferred_ty: &&&&*mut Test
|
||||
| 0: user_ty: Canonical { value: Ty(*mut Test), max_universe: U0, variables: [] }, span: $DIR/receiver_ptr_mutability.rs:15:14: 15:23, inferred_ty: *mut Test
|
||||
| 1: user_ty: Canonical { value: Ty(*mut Test), max_universe: U0, variables: [] }, span: $DIR/receiver_ptr_mutability.rs:15:14: 15:23, inferred_ty: *mut Test
|
||||
| 2: user_ty: Canonical { value: Ty(&&&&*mut Test), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/receiver_ptr_mutability.rs:19:18: 19:31, inferred_ty: &&&&*mut Test
|
||||
| 3: user_ty: Canonical { value: Ty(&&&&*mut Test), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/receiver_ptr_mutability.rs:19:18: 19:31, inferred_ty: &&&&*mut Test
|
||||
|
|
||||
fn main() -> () {
|
||||
let mut _0: ();
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR receiver_ptr_mutability.main.built.after.mir
|
||||
|
||||
#![feature(arbitrary_self_types)]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// compile-flags: -C debug-assertions=yes
|
||||
|
||||
// EMIT_MIR shifts.shift_signed.built.after.mir
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// Test that we don't generate unnecessarily large MIR for very simple matches
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// Check that when we compile the static `XXX` into MIR, we do not
|
||||
// generate `StorageStart` or `StorageEnd` statements.
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
#![feature(stmt_expr_attributes, rustc_attrs)]
|
||||
|
||||
// EMIT_MIR uniform_array_move_out.move_out_from_end.built.after.mir
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// compile-flags: -Z mir-opt-level=0
|
||||
|
||||
// EMIT_MIR byte_slice.main.SimplifyCfg-elaborate-drops.after.mir
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// EMIT_MIR casts.redundant.InstSimplify.diff
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// unit-test: InstSimplify
|
||||
// EMIT_MIR combine_array_len.norm2.InstSimplify.diff
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: InstSimplify
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone` before InstSimplify
|
||||
+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone` after InstSimplify
|
||||
- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone` before InstSimplify
|
||||
+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone` after InstSimplify
|
||||
|
||||
fn <impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
|
||||
fn <impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
|
||||
debug self => _1;
|
||||
let mut _0: MyThing<T>;
|
||||
let mut _2: T;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone` before InstSimplify
|
||||
+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone` after InstSimplify
|
||||
- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone` before InstSimplify
|
||||
+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone` after InstSimplify
|
||||
|
||||
fn <impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
|
||||
fn <impl at $DIR/combine_clone_of_primitives.rs:7:10: 7:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
|
||||
debug self => _1;
|
||||
let mut _0: MyThing<T>;
|
||||
let mut _2: T;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: InstSimplify
|
||||
// compile-flags: -C panic=abort
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// ignore-endian-big
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// ignore-endian-big
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// ignore-endian-big
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// compile-flags: -C overflow-checks=no -Zunsound-mir-opts
|
||||
|
||||
struct Point {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstGoto
|
||||
|
||||
pub enum Foo {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
#![feature(min_const_generics)]
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstGoto
|
||||
|
||||
// EMIT_MIR const_goto_storage.match_nested_if.ConstGoto.diff
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// ignore-endian-big
|
||||
extern "C" {
|
||||
static X: i32;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
|
||||
// EMIT_MIR address_of_pair.fn0.ConstProp.diff
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -O
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR bad_op_div_by_zero.main.ConstProp.diff
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// EMIT_MIR bad_op_mod_by_zero.main.ConstProp.diff
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -O -Zmir-opt-level=4
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -O
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR cast.main.ConstProp.diff
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -C overflow-checks=on
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// unit-test: ConstProp
|
||||
#[inline(never)]
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -Zmir-opt-level=1
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -O
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -C overflow-checks=on
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -Zmir-enable-passes=+Inline
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -Zmir-enable-passes=+RemoveZsts
|
||||
// Verify that we can pretty print invalid constants.
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -Z mir-opt-level=3
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -Z mir-opt-level=3
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
|
||||
// EMIT_MIR mult_by_zero.test.ConstProp.diff
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
|
||||
// EMIT_MIR mutable_variable.main.ConstProp.diff
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
|
||||
// EMIT_MIR mutable_variable_aggregate.main.ConstProp.diff
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
|
||||
// EMIT_MIR mutable_variable_aggregate_mut_ref.main.ConstProp.diff
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// unit-test: ConstProp
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
|
||||
static mut STATIC: u32 = 0x42424242;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// unit-test: ConstProp
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
|
||||
static FOO: u8 = 2;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR ref_deref.main.ConstProp.diff
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR ref_deref_project.main.ConstProp.diff
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR reify_fn_ptr.main.ConstProp.diff
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// compile-flags: -C overflow-checks=on
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// EMIT_MIR scalar_literal_propagation.main.ConstProp.diff
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -Zmir-enable-passes=+InstSimplify
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -Zmir-enable-passes=+SimplifyConstCondition-after-const-prop
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -O --crate-type=lib
|
||||
// ignore-endian-big
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// EMIT_MIR tuple_literal_propagation.main.ConstProp.diff
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR while_let_loops.change_loop_body.ConstProp.diff
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// unit-test: ConstProp
|
||||
#![feature(raw_ref_op)]
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// unit-test: CopyProp
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
//! Tests that we bail out when there are multiple assignments to the same local.
|
||||
// unit-test: CopyProp
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// skip-filecheck
|
||||
// Check that CopyProp does propagate return values of call terminators.
|
||||
// unit-test: CopyProp
|
||||
// needs-unwind
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue