]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_const_eval/src/const_eval/eval_queries.rs
Rollup merge of #98665 - ChrisDenton:deprecated-suggestion, r=compiler-errors
[rust.git] / compiler / rustc_const_eval / src / const_eval / eval_queries.rs
index b7e5e7aea49ce5a1cdf544db80be81b02bb79d5e..09a2977af04033b6e2559c38f7d0a575e9077d75 100644 (file)
@@ -337,7 +337,7 @@ pub fn eval_to_allocation_raw_provider<'tcx>(
                     }
                 };
 
-                Err(err.report_as_error(ecx.tcx.at(ecx.cur_span()), &msg))
+                Err(err.report_as_error(ecx.tcx.at(err.span), &msg))
             } else {
                 let hir_id = tcx.hir().local_def_id_to_hir_id(def.as_local().unwrap().did);
                 Err(err.report_as_lint(