]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/build/expr/as_place.rs
Use a struct for user type annotations
[rust.git] / src / librustc_mir / build / expr / as_place.rs
index 3ed00d5797907f638932cb4d51e097d6e94f724c..5429ce2a2e3dfe34214aff6804bc03d802722729 100644 (file)
@@ -6,7 +6,7 @@
 use hair::*;
 use rustc::mir::interpret::EvalErrorKind::BoundsCheck;
 use rustc::mir::*;
-use rustc::ty::Variance;
+use rustc::ty::{CanonicalUserTypeAnnotation, Variance};
 
 use rustc_data_structures::indexed_vec::Idx;
 
@@ -134,7 +134,7 @@ fn expr_as_place(
                 let place = unpack!(block = this.as_place(block, source));
                 if let Some(user_ty) = user_ty {
                     let annotation_index = this.canonical_user_type_annotations.push(
-                        (source_info.span, user_ty)
+                        CanonicalUserTypeAnnotation { span: source_info.span, user_ty }
                     );
                     this.cfg.push(
                         block,
@@ -157,7 +157,7 @@ fn expr_as_place(
                 );
                 if let Some(user_ty) = user_ty {
                     let annotation_index = this.canonical_user_type_annotations.push(
-                        (source_info.span, user_ty)
+                        CanonicalUserTypeAnnotation { span: source_info.span, user_ty }
                     );
                     this.cfg.push(
                         block,