about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-12-03 17:37:41 +0100
committerGitHub <noreply@github.com>2022-12-03 17:37:41 +0100
commit2119f7d7d1f06059dfe5059fb62362efa56d4069 (patch)
treebe077d8553cbeb53853c1724069ff360974ea197
parent46f0b38eb5f4965bd3230ceeba4a3ed7d0e5f68e (diff)
parent749c816faec774e7e7cae8ebad01d7ca0464b541 (diff)
downloadrust-2119f7d7d1f06059dfe5059fb62362efa56d4069.tar.gz
rust-2119f7d7d1f06059dfe5059fb62362efa56d4069.zip
Rollup merge of #104199 - SarthakSingh31:issue-97417-1, r=cjgillot
Keep track of the start of the argument block of a closure

This removes a call to `tcx.sess.source_map()` from [compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs](https://github.com/rust-lang/rust/compare/master...SarthakSingh31:issue-97417-1?expand=1#diff-8406bbc0d0b43d84c91b1933305df896ecdba0d1f9269e6744f13d87a2ab268a) as required by #97417.

VsCode automatically applied `rustfmt` to the files I edited under `src/tools`. I can undo that if its a problem.

r? `@cjgillot`
-rw-r--r--src/closures.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/closures.rs b/src/closures.rs
index 423c3a997f5..244d4427c56 100644
--- a/src/closures.rs
+++ b/src/closures.rs
@@ -335,6 +335,7 @@ pub(crate) fn rewrite_last_closure(
             ref fn_decl,
             ref body,
             fn_decl_span: _,
+            fn_arg_span: _,
         } = **closure;
         let body = match body.kind {
             ast::ExprKind::Block(ref block, _)