Skip to content

Commit 61e1cee

Browse files
committed
Don't implement Copy for types larger than 128 bits.
1 parent fc55931 commit 61e1cee

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ zerocopy = { version = "0.8.28", features = ["derive"] }
2525
[lints.rust]
2626
deprecated-safe = "warn"
2727
keyword-idents = "warn"
28-
missing_copy_implementations = "warn"
2928
missing_debug_implementations = "warn"
3029
trivial_casts = "warn"
3130
trivial_numeric_casts = "warn"

src/fdt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub(crate) const FDT_PROP: u32 = 0x3;
4343
pub(crate) const FDT_NOP: u32 = 0x4;
4444

4545
#[repr(C, packed)]
46-
#[derive(Debug, Copy, Clone, FromBytes, IntoBytes, Unaligned, Immutable, KnownLayout)]
46+
#[derive(Debug, Clone, FromBytes, IntoBytes, Unaligned, Immutable, KnownLayout)]
4747
pub(crate) struct FdtHeader {
4848
/// Magic number of the device tree.
4949
pub(crate) magic: big_endian::U32,

src/fdt/node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use crate::fdt::property::{FdtPropIter, FdtProperty};
1616
use crate::standard::{AddressSpaceProperties, NodeStandard};
1717

1818
/// A node in a flattened device tree.
19-
#[derive(Debug, Clone, Copy)]
19+
#[derive(Debug, Clone)]
2020
pub struct FdtNode<'a> {
2121
pub(crate) fdt: Fdt<'a>,
2222
pub(crate) offset: usize,
@@ -50,7 +50,7 @@ impl<'a> Node<'a> for FdtNode<'a> {
5050
}
5151

5252
fn children(&self) -> impl Iterator<Item = FdtNode<'a>> + use<'a> {
53-
FdtChildIter::Start { node: *self }
53+
FdtChildIter::Start { node: self.clone() }
5454
}
5555
}
5656

src/standard/memory.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl<'a, N: Node<'a>> Memory<N> {
7979
}
8080

8181
/// The value of an `initial-mapped-area` property.
82-
#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
82+
#[derive(Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
8383
pub struct InitialMappedArea {
8484
/// The effective address.
8585
pub effective_address: u64,

0 commit comments

Comments
 (0)