rust/src/test
bors 7c34d8d662 Auto merge of #69756 - wesleywiser:simplify_try, r=oli-obk
Modify SimplifyArmIdentity so it can trigger on mir-opt-level=1

I also added test cases to make sure the optimization can fire on all of
these cases:

```rust
fn case_1(o: Option<u8>) -> Option<u8> {
  match o {
    Some(u) => Some(u),
    None => None,
  }
}

fn case2(r: Result<u8, i32>) -> Result<u8, i32> {
  match r {
    Ok(u) => Ok(u),
    Err(i) => Err(i),
  }
}

fn case3(r: Result<u8, i32>) -> Result<u8, i32> {
  let u = r?;
  Ok(u)
}

```

Without MIR inlining, this still does not completely optimize away the
`?` operator because the `Try::into_result()`, `From::from()` and
`Try::from_error()` calls still exist. This does move us a bit closer to
that goal though because:

- We can now run the pass on mir-opt-level=1

- We no longer depend on the copy propagation pass running which is
  unlikely to stabilize anytime soon.

Fixes #66855
2020-05-14 06:22:40 +00:00
..
assembly
auxiliary test: Fix warnings in rust_test_helpers.c 2020-05-06 23:54:05 +03:00
codegen Defer creating drop trees in MIR lowering until leaving that scope 2020-05-09 10:50:55 +01:00
codegen-units Keep codegen units unmerged when building compiler builtins 2020-04-06 00:00:00 +00:00
compile-fail Add Option to Force Unwind Tables 2020-05-04 12:08:35 +01:00
debuginfo Update the minimum external LLVM to 8 2020-04-14 12:44:41 -07:00
incremental Fix disagreeement about CGU reuse and LTO 2020-05-09 19:30:48 -07:00
mir-opt Modify SimplifyArmIdentity so it can trigger on mir-opt-level=1 2020-05-11 20:31:02 -04:00
pretty Update tests to use llvm_asm! 2020-03-26 15:49:22 +00:00
run-make Use Cell::take in a couple places 2020-04-26 11:50:53 +02:00
run-make-fulldeps Auto merge of #70674 - cjgillot:query-arena-all, r=matthewjasper 2020-05-01 01:38:05 +00:00
run-pass-valgrind
rustdoc Rollup merge of #71928 - mibac138:strikethrough, r=GuillaumeGomez 2020-05-12 11:41:10 +02:00
rustdoc-js
rustdoc-js-std
rustdoc-ui Add rustdoc regression test for the unused_braces lint 2020-04-24 19:15:07 +02:00
rustfix
ui Auto merge of #71451 - estebank:suggest-super-trait-constraint, r=nikomatsakis 2020-05-13 06:54:15 +00:00
ui-fulldeps Rollup merge of #71555 - cjgillot:nameless, r=matthewjasper 2020-05-09 13:36:39 +02:00
COMPILER_TESTS.md