Skip to content

Commit f5ea2a2

Browse files
committed
Remove attrs
1 parent 696a8bf commit f5ea2a2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

crates/ide_assists/src/handlers/generate_default_from_new.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use ide_db::helpers::FamousDefs;
66
use itertools::Itertools;
77
use stdx::format_to;
88
use syntax::{
9-
ast::{self, AttrsOwner, GenericParamsOwner, Impl, NameOwner, TypeBoundsOwner},
9+
ast::{self, GenericParamsOwner, Impl, NameOwner, TypeBoundsOwner},
1010
AstNode,
1111
};
1212

@@ -80,10 +80,6 @@ fn generate_trait_impl_text_from_impl(impl_: &ast::Impl, trait_text: &str, code:
8080
let generic_params = impl_.generic_param_list();
8181
let mut buf = String::with_capacity(code.len());
8282
buf.push_str("\n\n");
83-
impl_
84-
.attrs()
85-
.filter(|attr| attr.as_simple_call().map(|(name, _arg)| name == "cfg").unwrap_or(false))
86-
.for_each(|attr| buf.push_str(format!("{}\n", attr.to_string()).as_str()));
8783
buf.push_str("impl");
8884

8985
if let Some(generic_params) = &generic_params {

0 commit comments

Comments
 (0)