about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-11-06 02:07:34 +0000
committerbors <bors@rust-lang.org>2023-11-06 02:07:34 +0000
commit152a4e90d19e04ea4714aef0f19c41ad5bc8f9ad (patch)
tree0ce337b761ddc7e078fac8692f33b5b44343d31d /compiler/rustc_trait_selection/src/traits
parent7a892ab8d8b6fd7a3f079f6c222f6f099a700292 (diff)
parentc077147200edaeb30dd294cbdc62dd02b01a8212 (diff)
downloadrust-152a4e90d19e04ea4714aef0f19c41ad5bc8f9ad.tar.gz
rust-152a4e90d19e04ea4714aef0f19c41ad5bc8f9ad.zip
Auto merge of #117585 - dnbln:feat/move-kw-span, r=cjgillot
Add the `Span` of the `move` keyword to the HIR.

This is required to implement a lint like the one described here: https://github.com/rust-lang/rust-clippy/issues/11721
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
-rw-r--r--compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
index 31da437f2e9..78ceddcd263 100644
--- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
+++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
@@ -2938,7 +2938,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
                 else {
                     bug!("expected closure in SizedClosureCapture obligation");
                 };
-                if let hir::CaptureBy::Value = closure.capture_clause
+                if let hir::CaptureBy::Value { .. } = closure.capture_clause
                     && let Some(span) = closure.fn_arg_span
                 {
                     err.span_label(span, "this closure captures all values by move");