HiddenDocAttr becomes DocHiddenAttr
This commit is contained in:
parent
18ea9245c6
commit
915ddb05fa
@ -46,7 +46,7 @@ pub(crate) fn add_missing_impl_members(acc: &mut Assists, ctx: &AssistContext<'_
|
||||
acc,
|
||||
ctx,
|
||||
DefaultMethods::No,
|
||||
IgnoreAssocItems::HiddenDocAttrPresent,
|
||||
IgnoreAssocItems::DocHiddenAttrPresent,
|
||||
"add_impl_missing_members",
|
||||
"Implement missing members",
|
||||
)
|
||||
@ -91,7 +91,7 @@ pub(crate) fn add_missing_default_members(
|
||||
acc,
|
||||
ctx,
|
||||
DefaultMethods::Only,
|
||||
IgnoreAssocItems::HiddenDocAttrPresent,
|
||||
IgnoreAssocItems::DocHiddenAttrPresent,
|
||||
"add_impl_default_members",
|
||||
"Implement default members",
|
||||
)
|
||||
@ -123,7 +123,7 @@ fn add_missing_impl_members_inner(
|
||||
|
||||
let mut ign_item = ignore_items;
|
||||
|
||||
if let IgnoreAssocItems::HiddenDocAttrPresent = ignore_items {
|
||||
if let IgnoreAssocItems::DocHiddenAttrPresent = ignore_items {
|
||||
// Relax condition for local crates.
|
||||
let db = ctx.db();
|
||||
if trait_.module(db).krate().origin(db).is_local() {
|
||||
|
@ -177,7 +177,7 @@ fn impl_def_from_trait(
|
||||
let ignore_items = if trait_.module(sema.db).krate().origin(sema.db).is_local() {
|
||||
IgnoreAssocItems::No
|
||||
} else {
|
||||
IgnoreAssocItems::HiddenDocAttrPresent
|
||||
IgnoreAssocItems::DocHiddenAttrPresent
|
||||
};
|
||||
|
||||
let trait_items =
|
||||
|
@ -86,7 +86,7 @@ pub fn test_related_attribute(fn_def: &ast::Fn) -> Option<ast::Attr> {
|
||||
|
||||
#[derive(Clone, Copy, PartialEq)]
|
||||
pub enum IgnoreAssocItems {
|
||||
HiddenDocAttrPresent,
|
||||
DocHiddenAttrPresent,
|
||||
No,
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ pub fn filter_assoc_items(
|
||||
.iter()
|
||||
.copied()
|
||||
.filter(|assoc_item| {
|
||||
!(ignore_items == IgnoreAssocItems::HiddenDocAttrPresent
|
||||
!(ignore_items == IgnoreAssocItems::DocHiddenAttrPresent
|
||||
&& assoc_item.attrs(sema.db).has_doc_hidden())
|
||||
})
|
||||
// Note: This throws away items with no source.
|
||||
|
Loading…
x
Reference in New Issue
Block a user