]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_mir/hair/mod.rs
Refactoring: added `PatternTypeAnnotation` wrapper around `UserTypeAnnotation` to...
[rust.git] / src / librustc_mir / hair / mod.rs
index 781b6c92aa13a859b00691c0bf1baa68606b8d97..11f5ce260030023daef09730023eaed8288692bb 100644 (file)
@@ -27,7 +27,7 @@
 pub mod cx;
 
 pub mod pattern;
-pub use self::pattern::{BindingMode, Pattern, PatternKind, FieldPattern};
+pub use self::pattern::{BindingMode, Pattern, PatternKind, PatternTypeAnnotation, FieldPattern};
 
 mod util;
 
@@ -276,12 +276,12 @@ pub enum ExprKind<'tcx> {
     PlaceTypeAscription {
         source: ExprRef<'tcx>,
         /// Type that the user gave to this expression
-        user_ty: UserTypeAnnotation<'tcx>,
+        user_ty: Option<UserTypeAnnotation<'tcx>>,
     },
     ValueTypeAscription {
         source: ExprRef<'tcx>,
         /// Type that the user gave to this expression
-        user_ty: UserTypeAnnotation<'tcx>,
+        user_ty: Option<UserTypeAnnotation<'tcx>>,
     },
     Closure {
         closure_id: DefId,