about summary refs log tree commit diff
path: root/src/test/mir-opt/validate_4.rs
AgeCommit message (Collapse)AuthorLines
2018-10-29Remove validation test cases; add retagging test caseRalf Jung-90/+0
2018-10-26Fix tests and rustdocNick Cameron-6/+6
2017-12-03initialize the destination in unit statementsAriel Ben-Yehuda-0/+1
Fixes #46159.
2017-11-28tests: update to include move annotations in MIR.Eduard-Mihai Burtescu-2/+2
2017-11-21clean the Debug impl for CrateNum and DefIdAriel Ben-Yehuda-6/+6
before: DefId { krate: CrateNum(11), index: DefIndex(0:6) => foo[8787]::Mapper[0]::OtherType[0] } } after: DefId(11:0:6 ~ foo[8787]::Mapper[0]::OtherType[0])
2017-11-09change separator from `.` to `-`Mikhail Modin-4/+4
2017-11-09change MIR dump filenames from `nodeN` to `DefPath`Mikhail Modin-8/+8
2017-11-02new rules for merging expected/supplied types in closure signaturesNiko Matsakis-2/+2
Also, fix numbering in mir-opt tests. We are now anonymizing more consistently, I think, and hence some of the `TyAnon` indices shifted.
2017-10-26Avoid unnecessary copies of arguments that are simple bindingsBjörn Steinbrink-8/+5
Initially MIR differentiated between arguments and locals, which introduced a need to add extra copies assigning the argument to a local, even for simple bindings. This differentiation no longer exists, but we're still creating those copies, bloating the MIR and LLVM IR we emit. Additionally, the current approach means that we create debug info for both the incoming argument (marking it as an argument), and then immediately shadow it a local that goes by the same name. This can be confusing when using e.g. "info args" in gdb, or when e.g. a debugger with a GUI displays the function arguments separately from the local variables, especially when the binding is mutable, because the argument doesn't change, while the local variable does.
2017-10-24Introduce CrateDisambiguator newtype and fix testsIgor Matuszewski-6/+6
2017-10-16Update crate hashes in mir-opt test after changing hash algorithm.Michael Woerister-6/+6
2017-10-14Auto merge of #45162 - chrisvittal:mir-testing, r=nikomatsakisbors-0/+9
Modify MIR testing to require consecutive lines MIR testing now requires that lines be consecutive. To achive this, instead of collecting the expected mir as a string, it is now wrapped in an `ExpectedLine` enum, that is either `Elision` or `Text(T)` where `T: AsRef<str>`. `Text` lines must be matched in order, unless separated by `Elision` lines. Elision occurs lazily, that is, an Elision will skip as few lines as possible. To add a new elision marker. Put a comment containing only "..." and whitespace in any MIR testing block. Like so: ``` // fn write_42(_1: *mut i32) -> bool { // ... // bb0: { // Validate(Acquire, [_1: *mut i32]); // Validate(Release, [_1: *mut i32]); // ... // return; // } // } ``` Right now, all input before the line right after `// START` is elided, and all input after the line right before `// END` is also not tested. Many tests need to be updated. That will follow in the next commit. cc #45153 r? @nikomatsakis
2017-10-09Update README and tests for new infrastructureChristopher Vittal-0/+9
2017-10-08Fix testsWonwoo Choi-4/+4
2017-10-05Fix infinite recursion in <DepNode as Debug>.Michael Woerister-6/+6
2017-09-08Use NodeId/HirId instead of DefId for local variables.Eduard-Mihai Burtescu-4/+4
2017-09-05Fix testsest31-6/+6
2017-08-04test MIR validation statements in closuresRalf Jung-1/+24
2017-08-01add a closure inside an unsafe fn to the testsRalf Jung-2/+4
2017-07-31Handle closures. Add some more tests.Ralf Jung-0/+58