create_exception
macro triggers unexpected_cfgs
lint in nightly build
#4743
Labels
create_exception
macro triggers unexpected_cfgs
lint in nightly build
#4743
Bug Description
At Polars we have just updated our toolchain to
nightly-2024-11-29
. This version includes an update to theunexpected_cfgs
check that also checks external macros. See rust-lang/rust#132577This seems to indicate the macro "leaves ineffective cfgs in the users code".
Not exactly sure what the fix should be here, but I figured I'd report it.
Steps to Reproduce
nightly-2024-11-29
pyo3::create_exception
macro.cargo build
Backtrace
Your operating system and version
Ubuntu 24.04.1
Your Python version (
python --version
)Python 3.12.2
Your Rust version (
rustc --version
)rustc 1.85.0-nightly (a2545fd6f 2024-11-28)
Your PyO3 version
0.22
How did you install python? Did you use a virtualenv?
pyenv
yes I am using a virtual environment
Additional Info
My current workaround is to use
#![allow(unexpected_cfgs)]
at the top of myexceptions.rs
module.The text was updated successfully, but these errors were encountered: