about summary refs log tree commit diff
path: root/src/librustc/mir
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2018-10-23 20:31:57 -0400
committerNiko Matsakis <niko@alum.mit.edu>2018-10-24 15:12:40 -0400
commit7c8887ccbf7104e98ead7539f3cfbd42332b5e4d (patch)
treee0045abb25811d5fa20190a1fe463dac05ed9deb /src/librustc/mir
parentf99911a4a0bead7dd1f9ef2f90442844434cc391 (diff)
downloadrust-7c8887ccbf7104e98ead7539f3cfbd42332b5e4d.tar.gz
rust-7c8887ccbf7104e98ead7539f3cfbd42332b5e4d.zip
introduce (but do not use) `ascribe_user_type` goal
Lots of annoying boilerplate.
Diffstat (limited to 'src/librustc/mir')
-rw-r--r--src/librustc/mir/mod.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs
index 62b5327ae46..571beaae459 100644
--- a/src/librustc/mir/mod.rs
+++ b/src/librustc/mir/mod.rs
@@ -2438,6 +2438,14 @@ EnumTypeFoldableImpl! {
     }
 }
 
+EnumLiftImpl! {
+    impl<'a, 'tcx> Lift<'tcx> for UserTypeAnnotation<'a> {
+        type Lifted = UserTypeAnnotation<'tcx>;
+        (UserTypeAnnotation::Ty)(ty),
+        (UserTypeAnnotation::TypeOf)(def, substs),
+    }
+}
+
 newtype_index! {
     pub struct Promoted {
         DEBUG_FORMAT = "promoted[{}]"