clippy: Enable self_named_constructors rule

This commit is contained in:
Tetsuharu Ohzeki 2024-02-09 22:31:21 +09:00
parent d24bb7e289
commit 7669619f9a
5 changed files with 4 additions and 5 deletions

View file

@ -30,7 +30,7 @@ macro_rules! impl_has_attrs {
impl HasAttrs for $def {
fn attrs(self, db: &dyn HirDatabase) -> AttrsWithOwner {
let def = AttrDefId::$def_id(self.into());
AttrsWithOwner::attrs_with_owner(db.upcast(), def)
AttrsWithOwner::new(db.upcast(), def)
}
fn attr_id(self) -> AttrDefId {
AttrDefId::$def_id(self.into())