@@ -10,7 +10,7 @@ use std::{fmt, iter};
1010use arrayvec:: ArrayVec ;
1111use thin_vec:: ThinVec ;
1212
13- use rustc_ast:: { self as ast, AttrStyle } ;
13+ use rustc_ast as ast;
1414use rustc_attr:: { ConstStability , Deprecation , Stability , StabilityLevel } ;
1515use rustc_const_eval:: const_eval:: is_unstable_const_fn;
1616use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
@@ -23,7 +23,7 @@ use rustc_hir_analysis::check::intrinsic::intrinsic_operation_unsafety;
2323use rustc_index:: vec:: IndexVec ;
2424use rustc_middle:: ty:: fast_reject:: SimplifiedType ;
2525use rustc_middle:: ty:: { self , DefIdTree , TyCtxt , Visibility } ;
26- use rustc_resolve:: rustdoc:: { add_doc_fragment, attrs_to_doc_fragments, DocFragment } ;
26+ use rustc_resolve:: rustdoc:: { add_doc_fragment, attrs_to_doc_fragments, inner_docs , DocFragment } ;
2727use rustc_session:: Session ;
2828use rustc_span:: hygiene:: MacroKind ;
2929use rustc_span:: symbol:: { kw, sym, Ident , Symbol } ;
@@ -405,7 +405,7 @@ impl Item {
405405 pub ( crate ) fn inner_docs ( & self , tcx : TyCtxt < ' _ > ) -> bool {
406406 self . item_id
407407 . as_def_id ( )
408- . map ( |did| tcx. get_attrs_unchecked ( did) . inner_docs ( ) )
408+ . map ( |did| inner_docs ( tcx. get_attrs_unchecked ( did) ) )
409409 . unwrap_or ( false )
410410 }
411411
@@ -874,8 +874,6 @@ pub(crate) trait AttributesExt {
874874
875875 fn span ( & self ) -> Option < rustc_span:: Span > ;
876876
877- fn inner_docs ( & self ) -> bool ;
878-
879877 fn cfg ( & self , tcx : TyCtxt < ' _ > , hidden_cfg : & FxHashSet < Cfg > ) -> Option < Arc < Cfg > > ;
880878}
881879
@@ -894,14 +892,6 @@ impl AttributesExt for [ast::Attribute] {
894892 self . iter ( ) . find ( |attr| attr. doc_str ( ) . is_some ( ) ) . map ( |attr| attr. span )
895893 }
896894
897- /// Returns whether the first doc-comment is an inner attribute.
898- ///
899- //// If there are no doc-comments, return true.
900- /// FIXME(#78591): Support both inner and outer attributes on the same item.
901- fn inner_docs ( & self ) -> bool {
902- self . iter ( ) . find ( |a| a. doc_str ( ) . is_some ( ) ) . map_or ( true , |a| a. style == AttrStyle :: Inner )
903- }
904-
905895 fn cfg ( & self , tcx : TyCtxt < ' _ > , hidden_cfg : & FxHashSet < Cfg > ) -> Option < Arc < Cfg > > {
906896 let sess = tcx. sess ;
907897 let doc_cfg_active = tcx. features ( ) . doc_cfg ;
0 commit comments