Skip to content

Commit

Permalink
No matter how trivial the change, tidy always finds a way to complain...
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmcm committed May 18, 2021
1 parent 6f7dea7 commit e2edee4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/test/codegen/try_identity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ type R = Result<u64, i32>;

// This was written to the `?` from `try_trait`, but `try_trait_v2` uses a different structure,
// so the relevant desugar is copied inline in order to keep the test testing the same thing.
// FIXME(#85133): while this might be useful for `r#try!`, it would be nice to have a MIR optimization
// that picks up the `?` desugaring, as `SimplifyArmIdentity` does not. See #85133
// FIXME(#85133): while this might be useful for `r#try!`, it would be nice to have a MIR
// optimization that picks up the `?` desugaring, as `SimplifyArmIdentity` does not.
#[no_mangle]
pub fn try_identity(x: R) -> R {
// CHECK: start:
Expand Down
4 changes: 2 additions & 2 deletions src/test/mir-opt/simplify-arm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ fn from_error<T, E>(e: E) -> Result<T, E> {

// This was written to the `?` from `try_trait`, but `try_trait_v2` uses a different structure,
// so the relevant desugar is copied inline in order to keep the test testing the same thing.
// FIXME(#85133): while this might be useful for `r#try!`, it would be nice to have a MIR optimization
// that picks up the `?` desugaring, as `SimplifyArmIdentity` does not. See #85133
// FIXME(#85133): while this might be useful for `r#try!`, it would be nice to have a MIR
// optimization that picks up the `?` desugaring, as `SimplifyArmIdentity` does not.
fn id_try(r: Result<u8, i32>) -> Result<u8, i32> {
let x = match into_result(r) {
Err(e) => return from_error(From::from(e)),
Expand Down
4 changes: 2 additions & 2 deletions src/test/mir-opt/simplify_try.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ fn from_error<T, E>(e: E) -> Result<T, E> {

// This was written to the `?` from `try_trait`, but `try_trait_v2` uses a different structure,
// so the relevant desugar is copied inline in order to keep the test testing the same thing.
// FIXME(#85133): while this might be useful for `r#try!`, it would be nice to have a MIR optimization
// that picks up the `?` desugaring, as `SimplifyArmIdentity` does not. See #85133
// FIXME(#85133): while this might be useful for `r#try!`, it would be nice to have a MIR
// optimization that picks up the `?` desugaring, as `SimplifyArmIdentity` does not.
fn try_identity(x: Result<u32, i32>) -> Result<u32, i32> {
let y = match into_result(x) {
Err(e) => return from_error(From::from(e)),
Expand Down

0 comments on commit e2edee4

Please sign in to comment.