about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2021-05-09 22:05:02 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2021-05-09 22:05:02 -0700
commitbf0e34c00159b60472ca2f78adb8837b9f5849a2 (patch)
treeb900d04d34f95499eced74055d52b77800c0e96f /src/test
parentb7a6c4a905e9e4b13785a6544434f6ffe859329c (diff)
downloadrust-bf0e34c00159b60472ca2f78adb8837b9f5849a2.tar.gz
rust-bf0e34c00159b60472ca2f78adb8837b9f5849a2.zip
PR feedback
Diffstat (limited to 'src/test')
-rw-r--r--src/test/codegen/try_identity.rs8
-rw-r--r--src/test/mir-opt/simplify-arm.rs8
-rw-r--r--src/test/mir-opt/simplify_try.rs8
3 files changed, 12 insertions, 12 deletions
diff --git a/src/test/codegen/try_identity.rs b/src/test/codegen/try_identity.rs
index 78da06b2fe4..71bfc3b44da 100644
--- a/src/test/codegen/try_identity.rs
+++ b/src/test/codegen/try_identity.rs
@@ -7,10 +7,10 @@
 
 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.
+// 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: 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
 #[no_mangle]
 pub fn try_identity(x: R) -> R {
 // CHECK: start:
diff --git a/src/test/mir-opt/simplify-arm.rs b/src/test/mir-opt/simplify-arm.rs
index b789b87f6c2..6a6e39e68f9 100644
--- a/src/test/mir-opt/simplify-arm.rs
+++ b/src/test/mir-opt/simplify-arm.rs
@@ -28,10 +28,10 @@ fn from_error<T, E>(e: E) -> Result<T, E> {
     Err(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.
+// 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: 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
 fn id_try(r: Result<u8, i32>) -> Result<u8, i32> {
     let x = match into_result(r) {
         Err(e) => return from_error(From::from(e)),
diff --git a/src/test/mir-opt/simplify_try.rs b/src/test/mir-opt/simplify_try.rs
index a95cb665a97..b91a7bfe68f 100644
--- a/src/test/mir-opt/simplify_try.rs
+++ b/src/test/mir-opt/simplify_try.rs
@@ -13,10 +13,10 @@ fn from_error<T, E>(e: E) -> Result<T, E> {
     Err(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.
+// 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: 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
 fn try_identity(x: Result<u32, i32>) -> Result<u32, i32> {
     let y = match into_result(x) {
         Err(e) => return from_error(From::from(e)),