mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 13:33:31 +00:00
clippy: Enable non_canonical_clone_impl
rule
This commit is contained in:
parent
7669619f9a
commit
2601d19bac
4 changed files with 4 additions and 5 deletions
|
@ -172,7 +172,6 @@ borrowed_box = "allow"
|
|||
derived_hash_with_manual_eq = "allow"
|
||||
forget_non_drop = "allow"
|
||||
needless_doctest_main = "allow"
|
||||
non_canonical_clone_impl = "allow"
|
||||
non_canonical_partial_ord_impl = "allow"
|
||||
too_many_arguments = "allow"
|
||||
type_complexity = "allow"
|
||||
|
|
|
@ -372,7 +372,7 @@ impl<N> FileItemTreeId<N> {
|
|||
|
||||
impl<N> Clone for FileItemTreeId<N> {
|
||||
fn clone(&self) -> Self {
|
||||
Self(self.0)
|
||||
*self
|
||||
}
|
||||
}
|
||||
impl<N> Copy for FileItemTreeId<N> {}
|
||||
|
|
|
@ -219,7 +219,7 @@ pub struct ItemLoc<N: ItemTreeModItemNode> {
|
|||
|
||||
impl<N: ItemTreeModItemNode> Clone for ItemLoc<N> {
|
||||
fn clone(&self) -> Self {
|
||||
Self { container: self.container, id: self.id }
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -248,7 +248,7 @@ pub struct AssocItemLoc<N: ItemTreeModItemNode> {
|
|||
|
||||
impl<N: ItemTreeModItemNode> Clone for AssocItemLoc<N> {
|
||||
fn clone(&self) -> Self {
|
||||
Self { container: self.container, id: self.id }
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ impl<N: AstNode + std::fmt::Debug> std::fmt::Debug for AstPtr<N> {
|
|||
impl<N: AstNode> Copy for AstPtr<N> {}
|
||||
impl<N: AstNode> Clone for AstPtr<N> {
|
||||
fn clone(&self) -> AstPtr<N> {
|
||||
AstPtr { raw: self.raw, _ty: PhantomData }
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue