about summary refs log tree commit diff
path: root/src/librustc_trans
diff options
context:
space:
mode:
authorEduard Burtescu <edy.burt@gmail.com>2016-07-22 18:56:22 +0300
committerEduard Burtescu <edy.burt@gmail.com>2016-08-12 06:43:34 +0300
commitef11d4e3c7040bf7cbb351dac8317a7957471b3b (patch)
tree163620cf8be4fda40f6e91281db5d64e501f7edf /src/librustc_trans
parentf0baec691f9bfcfc70d6f35b1a86f7cf204a7d4f (diff)
downloadrust-ef11d4e3c7040bf7cbb351dac8317a7957471b3b.tar.gz
rust-ef11d4e3c7040bf7cbb351dac8317a7957471b3b.zip
rustc: add TyAnon (impl Trait) to the typesystem.
Diffstat (limited to 'src/librustc_trans')
-rw-r--r--src/librustc_trans/collector.rs1
-rw-r--r--src/librustc_trans/debuginfo/type_names.rs1
-rw-r--r--src/librustc_trans/trans_item.rs3
-rw-r--r--src/librustc_trans/type_of.rs12
4 files changed, 11 insertions, 6 deletions
diff --git a/src/librustc_trans/collector.rs b/src/librustc_trans/collector.rs
index 58b49f6944f..4a6dbb2bdae 100644
--- a/src/librustc_trans/collector.rs
+++ b/src/librustc_trans/collector.rs
@@ -796,6 +796,7 @@ fn find_drop_glue_neighbors<'a, 'tcx>(scx: &SharedCrateContext<'a, 'tcx>,
         ty::TyProjection(_) |
         ty::TyParam(_)      |
         ty::TyInfer(_)      |
+        ty::TyAnon(..)      |
         ty::TyError         => {
             bug!("encountered unexpected type");
         }
diff --git a/src/librustc_trans/debuginfo/type_names.rs b/src/librustc_trans/debuginfo/type_names.rs
index 63f460e4693..bee2667c71f 100644
--- a/src/librustc_trans/debuginfo/type_names.rs
+++ b/src/librustc_trans/debuginfo/type_names.rs
@@ -150,6 +150,7 @@ pub fn push_debuginfo_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
         ty::TyError |
         ty::TyInfer(_) |
         ty::TyProjection(..) |
+        ty::TyAnon(..) |
         ty::TyParam(_) => {
             bug!("debuginfo: Trying to create type name for \
                 unexpected type: {:?}", t);
diff --git a/src/librustc_trans/trans_item.rs b/src/librustc_trans/trans_item.rs
index d0e00a6d593..187ffe353fd 100644
--- a/src/librustc_trans/trans_item.rs
+++ b/src/librustc_trans/trans_item.rs
@@ -536,7 +536,8 @@ pub fn push_unique_type_name<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
         ty::TyError |
         ty::TyInfer(_) |
         ty::TyProjection(..) |
-        ty::TyParam(_) => {
+        ty::TyParam(_) |
+        ty::TyAnon(..) => {
             bug!("debuginfo: Trying to create type name for \
                   unexpected type: {:?}", t);
         }
diff --git a/src/librustc_trans/type_of.rs b/src/librustc_trans/type_of.rs
index 496870d6c27..cde53f6fa89 100644
--- a/src/librustc_trans/type_of.rs
+++ b/src/librustc_trans/type_of.rs
@@ -112,7 +112,8 @@ pub fn sizing_type_of<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, t: Ty<'tcx>) -> Typ
             }
         }
 
-        ty::TyProjection(..) | ty::TyInfer(..) | ty::TyParam(..) | ty::TyError => {
+        ty::TyProjection(..) | ty::TyInfer(..) | ty::TyParam(..) |
+        ty::TyAnon(..) | ty::TyError => {
             bug!("fictitious type {:?} in sizing_type_of()", t)
         }
         ty::TySlice(_) | ty::TyTrait(..) | ty::TyStr => bug!()
@@ -339,10 +340,11 @@ pub fn in_memory_type_of<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, t: Ty<'tcx>) ->
           }
       }
 
-      ty::TyInfer(..) => bug!("type_of with TyInfer"),
-      ty::TyProjection(..) => bug!("type_of with TyProjection"),
-      ty::TyParam(..) => bug!("type_of with ty_param"),
-      ty::TyError => bug!("type_of with TyError"),
+      ty::TyInfer(..) |
+      ty::TyProjection(..) |
+      ty::TyParam(..) |
+      ty::TyAnon(..) |
+      ty::TyError => bug!("type_of with {:?}", t),
     };
 
     debug!("--> mapped t={:?} to llty={:?}", t, llty);