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