]> git.lizzy.rs Git - rust.git/commitdiff
Copy body span instead of querying it
authorDániel Buga <bugadani@gmail.com>
Sun, 17 Jan 2021 13:50:47 +0000 (14:50 +0100)
committerDániel Buga <bugadani@gmail.com>
Sun, 17 Jan 2021 13:50:47 +0000 (14:50 +0100)
compiler/rustc_mir/src/transform/const_prop.rs

index a311e262dd4df7a6c7174f409d5d39b9c080cf91..354d213689ec21b2f2bad437ad689627ee563931 100644 (file)
@@ -139,7 +139,7 @@ fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
             Default::default(),
             body.arg_count,
             Default::default(),
-            tcx.def_span(def_id),
+            body.span,
             body.generator_kind,
         );