about summary refs log tree commit diff
path: root/src/librustc_resolve
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2016-09-15 00:51:46 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2016-10-04 22:25:25 +0300
commitbd291ce21a568c613774bb171e6f2df915747a29 (patch)
tree60fa88f3f4b596ed7882f9097dbd2a878dc31a67 /src/librustc_resolve
parent75d6522b9a4992b33b69e8fe76ae9be999dd66d3 (diff)
downloadrust-bd291ce21a568c613774bb171e6f2df915747a29.tar.gz
rust-bd291ce21a568c613774bb171e6f2df915747a29.zip
Turn some impossible definitions into ICEs
Diffstat (limited to 'src/librustc_resolve')
-rw-r--r--src/librustc_resolve/lib.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs
index 49e7f3ba19c..4f41dfc8b64 100644
--- a/src/librustc_resolve/lib.rs
+++ b/src/librustc_resolve/lib.rs
@@ -2786,8 +2786,7 @@ impl<'a> Resolver<'a> {
             // Look for a field with the same name in the current self_type.
             if let Some(resolution) = self.def_map.get(&node_id) {
                 match resolution.base_def {
-                    Def::Enum(did) | Def::TyAlias(did) | Def::Union(did) |
-                    Def::Struct(did) | Def::Variant(did) if resolution.depth == 0 => {
+                    Def::Struct(did) | Def::Union(did) if resolution.depth == 0 => {
                         if let Some(field_names) = self.field_names.get(&did) {
                             if field_names.iter().any(|&field_name| name == field_name) {
                                 return Field;