]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_typeck/src/check/cast.rs
Rollup merge of #87596 - jesyspa:issue-87318-hidden-whitespace, r=estebank
[rust.git] / compiler / rustc_typeck / src / check / cast.rs
index b3808eae1ad1155c10af372a76d9632562b005c6..181972e3e7bade679d581f9d78135f6b3e1b4bfb 100644 (file)
@@ -604,8 +604,8 @@ fn trivial_cast_lint(&self, fcx: &FnCtxt<'a, 'tcx>) {
     }
 
     pub fn check(mut self, fcx: &FnCtxt<'a, 'tcx>) {
-        self.expr_ty = fcx.structurally_resolved_type(self.span, self.expr_ty);
-        self.cast_ty = fcx.structurally_resolved_type(self.span, self.cast_ty);
+        self.expr_ty = fcx.structurally_resolved_type(self.expr.span, self.expr_ty);
+        self.cast_ty = fcx.structurally_resolved_type(self.cast_span, self.cast_ty);
 
         debug!("check_cast({}, {:?} as {:?})", self.expr.hir_id, self.expr_ty, self.cast_ty);