Skip to content

Commit dd95872

Browse files
committed
Group::static_empty() returns a borrow to a static variable instead of a promoted const value.
1 parent 9b33a37 commit dd95872

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/raw/generic.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl Group {
6363
_align: Group,
6464
bytes: [u8; Group::WIDTH],
6565
};
66-
const ALIGNED_BYTES: AlignedBytes = AlignedBytes {
66+
static ALIGNED_BYTES: AlignedBytes = AlignedBytes {
6767
bytes: [EMPTY; Group::WIDTH],
6868
};
6969
unsafe { &ALIGNED_BYTES.bytes }

src/raw/sse2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub const BITMASK_MASK: BitMaskWord = 0xffff;
1919
pub struct Group(x86::__m128i);
2020

2121
// FIXME: https://github.com/rust-lang/rust-clippy/issues/3859
22-
#[allow(clippy::use_self)]
22+
#[allow(clippy::use_self)]
2323
impl Group {
2424
/// Number of bytes in the group.
2525
pub const WIDTH: usize = mem::size_of::<Self>();
@@ -34,7 +34,7 @@ impl Group {
3434
_align: Group,
3535
bytes: [u8; Group::WIDTH],
3636
};
37-
const ALIGNED_BYTES: AlignedBytes = AlignedBytes {
37+
static ALIGNED_BYTES: AlignedBytes = AlignedBytes {
3838
bytes: [EMPTY; Group::WIDTH],
3939
};
4040
unsafe { &ALIGNED_BYTES.bytes }

0 commit comments

Comments
 (0)