about summary refs log tree commit diff
path: root/src/librustc_metadata/decoder.rs
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-03-24 17:49:58 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-03-24 17:59:18 +0300
commit2cbc25e6fce9bb594ea78ccfd58ef1b6ea42ea38 (patch)
tree96398c53c365693a2e0a0843b957478e22803139 /src/librustc_metadata/decoder.rs
parent5bcf9f4f119b8109c6c642dcfeb63fb39c26950a (diff)
downloadrust-2cbc25e6fce9bb594ea78ccfd58ef1b6ea42ea38.tar.gz
rust-2cbc25e6fce9bb594ea78ccfd58ef1b6ea42ea38.zip
Merge `DefPathData::VariantCtor` and `DefPathData::StructCtor`
Diffstat (limited to 'src/librustc_metadata/decoder.rs')
-rw-r--r--src/librustc_metadata/decoder.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_metadata/decoder.rs b/src/librustc_metadata/decoder.rs
index c6f7b46d383..0e750cd15ee 100644
--- a/src/librustc_metadata/decoder.rs
+++ b/src/librustc_metadata/decoder.rs
@@ -947,11 +947,11 @@ impl<'a, 'tcx> CrateMetadata {
             return Lrc::new([]);
         }
 
-        // The attributes for a tuple struct are attached to the definition, not the ctor;
+        // The attributes for a tuple struct/variant are attached to the definition, not the ctor;
         // we assume that someone passing in a tuple struct ctor is actually wanting to
         // look at the definition
         let def_key = self.def_key(node_id);
-        let item_id = if def_key.disambiguated_data.data == DefPathData::StructCtor {
+        let item_id = if def_key.disambiguated_data.data == DefPathData::Ctor {
             def_key.parent.unwrap()
         } else {
             node_id