]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/build/expr/as_lvalue.rs
Rollup merge of #41249 - GuillaumeGomez:rustdoc-render, r=steveklabnik,frewsxcv
[rust.git] / src / librustc_mir / build / expr / as_lvalue.rs
index 1cd9a1b25bade8c0f1080b61480637d5e50423f2..df2841a66826980d6cd1ae96739c3ed4cba53b05 100644 (file)
@@ -62,7 +62,8 @@ fn expr_as_lvalue(&mut self,
                 let idx = unpack!(block = this.as_operand(block, None, index));
 
                 // bounds check:
-                let (len, lt) = (this.temp(usize_ty.clone()), this.temp(bool_ty));
+                let (len, lt) = (this.temp(usize_ty.clone(), expr_span),
+                                 this.temp(bool_ty, expr_span));
                 this.cfg.push_assign(block, source_info, // len = len(slice)
                                      &len, Rvalue::Len(slice.clone()));
                 this.cfg.push_assign(block, source_info, // lt = idx < len