Skip to content

Commit

Permalink
[ci] Roll nightly toolchain (#1101)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshlf committed Apr 8, 2024
1 parent 7162609 commit 51edd20
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ zerocopy-panic-in-const = "1.57.0"
[package.metadata.ci]
# The versions of the stable and nightly compiler toolchains to use in CI.
pinned-stable = "1.77.1"
pinned-nightly = "nightly-2024-04-05"
pinned-nightly = "nightly-2024-04-07"

[package.metadata.docs.rs]
all-features = true
Expand Down
7 changes: 5 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4422,8 +4422,11 @@ macro_rules! transmute {
// contexts in which `core` was not manually imported. This is not a
// problem for 2018 edition crates.
let u = unsafe {
// Clippy: It's okay to transmute a type to itself.
#[allow(clippy::useless_transmute)]
// Clippy:
// - It's okay to transmute a type to itself.
// - We can't annotate the types; this macro is designed to
// infer the types from the calling context.
#[allow(clippy::useless_transmute, clippy::missing_transmute_annotations)]
$crate::macro_util::core_reexport::mem::transmute(e)
};
$crate::macro_util::must_use(u)
Expand Down
14 changes: 11 additions & 3 deletions src/macro_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,12 @@ macro_rules! assert_align_gt_eq {
// other words, if `align_of::<T>() >= align_of::<U>()`.
//
// SAFETY: This code is never run.
max_aligns = unsafe { $crate::macro_util::core_reexport::mem::transmute(align_of) };
max_aligns = unsafe {
// Clippy: We can't annotate the types; this macro is designed
// to infer the types from the calling context.
#[allow(clippy::missing_transmute_annotations)]
$crate::macro_util::core_reexport::mem::transmute(align_of)
};
} else {
loop {}
}
Expand All @@ -328,8 +333,11 @@ macro_rules! assert_size_eq {
if false {
// SAFETY: This code is never run.
$u = unsafe {
// Clippy: It's okay to transmute a type to itself.
#[allow(clippy::useless_transmute)]
// Clippy:
// - It's okay to transmute a type to itself.
// - We can't annotate the types; this macro is designed to
// infer the types from the calling context.
#[allow(clippy::useless_transmute, clippy::missing_transmute_annotations)]
$crate::macro_util::core_reexport::mem::transmute($t)
};
} else {
Expand Down

0 comments on commit 51edd20

Please sign in to comment.