about summary refs log tree commit diff
path: root/compiler/rustc_borrowck
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-02-18 07:35:37 +0000
committerbors <bors@rust-lang.org>2022-02-18 07:35:37 +0000
commitfeac2ecf1cae1dd0f56bed1cecc6e109c64b3d4f (patch)
tree2cc75b0e141a0f5497667d250993f9cc5e9d1a86 /compiler/rustc_borrowck
parentf838a425e3134d036a7d9632935111a569ac7446 (diff)
parent86d17b98f2dbb732049d9671c354903b19203b56 (diff)
downloadrust-feac2ecf1cae1dd0f56bed1cecc6e109c64b3d4f.tar.gz
rust-feac2ecf1cae1dd0f56bed1cecc6e109c64b3d4f.zip
Auto merge of #94088 - oli-obk:revert, r=jackh726
Revert #91403

fixes #94004

r? `@pnkfelix` `@cjgillot`
Diffstat (limited to 'compiler/rustc_borrowck')
-rw-r--r--compiler/rustc_borrowck/src/region_infer/mod.rs18
1 files changed, 0 insertions, 18 deletions
diff --git a/compiler/rustc_borrowck/src/region_infer/mod.rs b/compiler/rustc_borrowck/src/region_infer/mod.rs
index dee47a3e440..abd6a15334c 100644
--- a/compiler/rustc_borrowck/src/region_infer/mod.rs
+++ b/compiler/rustc_borrowck/src/region_infer/mod.rs
@@ -2156,24 +2156,6 @@ impl<'tcx> RegionInferenceContext<'tcx> {
                 }
             }
 
-            // When in async fn, prefer errors that come from inside the closure.
-            if !categorized_path[i].from_closure {
-                let span = categorized_path.iter().find_map(|p| {
-                    if p.from_closure
-                        && p.category == categorized_path[i].category
-                        && categorized_path[i].cause.span.contains(p.cause.span)
-                    {
-                        Some(p.cause.span)
-                    } else {
-                        None
-                    }
-                });
-
-                if let Some(span) = span {
-                    categorized_path[i].cause.span = span;
-                }
-            }
-
             return categorized_path[i].clone();
         }