]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/doctest.rs
Auto merge of #96745 - ehuss:even-more-attribute-validation, r=cjgillot
[rust.git] / src / librustdoc / doctest.rs
index 213f564ce2db593adcf111041aefdba1d48bf7b6..20ae102bc27d30ce7cee4a74eda73c4b145dad4d 100644 (file)
@@ -1222,7 +1222,7 @@ fn visit_testable<F: FnOnce(&mut Self)>(
 
         // The collapse-docs pass won't combine sugared/raw doc attributes, or included files with
         // anything else, this will combine them for us.
-        let attrs = Attributes::from_ast(ast_attrs, None);
+        let attrs = Attributes::from_ast(ast_attrs);
         if let Some(doc) = attrs.collapsed_doc_value() {
             // Use the outermost invocation, so that doctest names come from where the docs were written.
             let span = ast_attrs
@@ -1289,14 +1289,9 @@ fn visit_foreign_item(&mut self, item: &'hir hir::ForeignItem<'_>) {
         });
     }
 
-    fn visit_variant(
-        &mut self,
-        v: &'hir hir::Variant<'_>,
-        g: &'hir hir::Generics<'_>,
-        item_id: hir::HirId,
-    ) {
+    fn visit_variant(&mut self, v: &'hir hir::Variant<'_>) {
         self.visit_testable(v.ident.to_string(), v.id, v.span, |this| {
-            intravisit::walk_variant(this, v, g, item_id);
+            intravisit::walk_variant(this, v);
         });
     }