about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs
index 0f9d4cb1982..8ba7969207e 100644
--- a/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs
+++ b/compiler/rustc_trait_selection/src/error_reporting/infer/mod.rs
@@ -1837,11 +1837,10 @@ impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
         };
         if let Some(tykind) = tykind
             && let hir::TyKind::Array(_, length) = tykind
-            && let hir::ArrayLen::Body(ct) = length
             && let Some((scalar, ty)) = sz.found.try_to_scalar()
             && ty == self.tcx.types.usize
         {
-            let span = ct.span();
+            let span = length.span();
             Some(TypeErrorAdditionalDiags::ConsiderSpecifyingLength {
                 span,
                 length: scalar.to_target_usize(&self.tcx).unwrap(),