Skip to content

Commit 81ad2e8

Browse files
authored
Merge pull request #3598 from davidhewitt/clippy-beta
ci: run beta clippy as an allowed-to-fail job
2 parents 016b110 + cf67c2c commit 81ad2e8

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,17 @@ jobs:
113113
rust-target: "i686-pc-windows-msvc",
114114
},
115115
]
116+
include:
117+
# Run beta clippy as a way to detect any incoming lints which may affect downstream users
118+
- rust: beta
119+
platform:
120+
{
121+
os: "ubuntu-latest",
122+
python-architecture: "x64",
123+
rust-target: "x86_64-unknown-linux-gnu",
124+
}
116125
name: clippy/${{ matrix.platform.rust-target }}/${{ matrix.rust }}
126+
continue-on-error: ${{ matrix.platform.rust != 'stable' }}
117127
steps:
118128
- uses: actions/checkout@v4
119129
- uses: dtolnay/rust-toolchain@master

pyo3-ffi/src/cpython/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ pub(crate) mod pystate;
3131
pub(crate) mod pythonrun;
3232
// skipped sysmodule.h
3333
pub(crate) mod floatobject;
34-
#[cfg(not(PyPy))]
3534
pub(crate) mod pyframe;
3635
pub(crate) mod tupleobject;
3736
pub(crate) mod unicodeobject;
@@ -60,7 +59,7 @@ pub use self::object::*;
6059
pub use self::objimpl::*;
6160
pub use self::pydebug::*;
6261
pub use self::pyerrors::*;
63-
#[cfg(not(PyPy))]
62+
#[cfg(Py_3_11)]
6463
pub use self::pyframe::*;
6564
#[cfg(all(Py_3_8, not(PyPy)))]
6665
pub use self::pylifecycle::*;
@@ -69,4 +68,5 @@ pub use self::pystate::*;
6968
pub use self::pythonrun::*;
7069
pub use self::tupleobject::*;
7170
pub use self::unicodeobject::*;
71+
#[cfg(not(PyPy))]
7272
pub use self::weakrefobject::*;

tests/test_serde.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ mod test_serde {
6666
assert_eq!(user.username, "danya");
6767
assert!(user.group.is_none());
6868
assert_eq!(user.friends.len(), 1usize);
69-
let friend = user.friends.get(0).unwrap();
69+
let friend = user.friends.first().unwrap();
7070

7171
Python::with_gil(|py| {
7272
assert_eq!(friend.borrow(py).username, "friend");

0 commit comments

Comments
 (0)