diff options
| author | bors <bors@rust-lang.org> | 2017-10-14 11:22:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-10-14 11:22:46 +0000 |
| commit | af7de7b6774b061b7809ce9aa6db31ea29df33c8 (patch) | |
| tree | 6f0911c356c1366a35b9fc147643224582251d19 /src/rustllvm/RustWrapper.cpp | |
| parent | 2d75213709ab78d0db9051d9e0b550192e1aa15a (diff) | |
| parent | 426183c01bbaf398e8ae68bd554488af23e49dbd (diff) | |
| download | rust-af7de7b6774b061b7809ce9aa6db31ea29df33c8.tar.gz rust-af7de7b6774b061b7809ce9aa6db31ea29df33c8.zip | |
Auto merge of #45162 - chrisvittal:mir-testing, r=nikomatsakis
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
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
