Skip to content

Commit

Permalink
[CI] Only run Clippy on nightly
Browse files Browse the repository at this point in the history
Closes #328
  • Loading branch information
joshlf committed Sep 5, 2023
1 parent 6a8f67c commit dd76688
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ jobs:

- name: Clippy check
run: cargo +${{ env.ZC_TOOLCHAIN }} clippy --package ${{ matrix.crate }} --target ${{ matrix.target }} ${{ matrix.features }} --tests --verbose
# Clippy improves the accuracy of lints over time, and fixes bugs. Only
# running Clippy on nightly allows us to avoid having to write code which
# is compatible with older versions of Clippy, which sometimes requires
# hacks to work around limitations that are fixed in more recent versions.
if: matrix.toolchain == 'nightly'

- name: Cargo doc
# We pass --document-private-items and --document-hidden items to ensure that
Expand Down
6 changes: 0 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1598,10 +1598,6 @@ macro_rules! transmute {
// were to use `core::mem::transmute`, this macro would not work in
// `std` contexts in which `core` was not manually imported. This is
// not a problem for 2018 edition crates.
//
// Some older versions of Clippy have a bug in which they don't
// recognize the preceding safety comment.
#[allow(clippy::undocumented_unsafe_blocks)]
unsafe { $crate::__real_transmute(e) }
}
}}
Expand Down Expand Up @@ -2405,8 +2401,6 @@ impl<'a, T: ?Sized> AsAddress for &'a mut T {
impl<T: ?Sized> AsAddress for *const T {
#[inline(always)]
fn addr(self) -> usize {
#![allow(clippy::needless_return)]

// TODO(https://github.com/rust-lang/rust/issues/95228): Use `.addr()`
// instead of `as usize` once it's stable, and get rid of this `allow`.
// Currently, `as usize` is the only way to accomplish this.
Expand Down

0 comments on commit dd76688

Please sign in to comment.