Skip to content

Commit

Permalink
HiddenDocAttr becomes DocHiddenAttr
Browse files Browse the repository at this point in the history
  • Loading branch information
alibektas committed Jul 7, 2023
1 parent 18ea924 commit 915ddb0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions crates/ide-assists/src/handlers/add_missing_impl_members.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Expand Down Expand Up @@ -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",
)
Expand Down Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
4 changes: 2 additions & 2 deletions crates/ide-assists/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand All @@ -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.
Expand Down

0 comments on commit 915ddb0

Please sign in to comment.