]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/clean/types.rs
Rollup merge of #68462 - matthiaskrgr:novec, r=varkor
[rust.git] / src / librustdoc / clean / types.rs
index c8f1dff703fb40b22f93ab552ab958f478792e98..79a078ca7a991abdaf58ccdf8728d6e22b466fbf 100644 (file)
@@ -497,7 +497,7 @@ pub fn has_doc_flag(&self, flag: Symbol) -> bool {
         false
     }
 
-    pub fn from_ast(diagnostic: &::errors::Handler, attrs: &[ast::Attribute]) -> Attributes {
+    pub fn from_ast(diagnostic: &::rustc_errors::Handler, attrs: &[ast::Attribute]) -> Attributes {
         let mut doc_strings = vec![];
         let mut sp = None;
         let mut cfg = Cfg::True;
@@ -1406,6 +1406,14 @@ pub struct PathSegment {
 pub struct Typedef {
     pub type_: Type,
     pub generics: Generics,
+    // Type of target item.
+    pub item_type: Option<Type>,
+}
+
+impl GetDefId for Typedef {
+    fn def_id(&self) -> Option<DefId> {
+        self.type_.def_id()
+    }
 }
 
 #[derive(Clone, Debug)]