fn add_without_unwanted_attributes(
    attrs: &mut Vec<Attribute>,
    new_attrs: &[Attribute],
    is_inline: bool
)
Expand description

When inlining items, we merge its attributes (and all the reexports attributes too) with the final reexport. For example:

ⓘ
#[doc(hidden, cfg(feature = "foo"))]
pub struct Foo;

#[doc(cfg(feature = "bar"))]
#[doc(hidden, no_inline)]
pub use Foo as Foo1;

#[doc(inline)]
pub use Foo2 as Bar;
Run

So Bar at the end will have both cfg(feature = "..."). However, we don’t want to merge all attributes so we filter out the following ones:

  • doc(inline)
  • doc(no_inline)
  • doc(hidden)