You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test_compiler_errors are failing due to a recent upstream change in either zerocopy or because of the rust 1.80.0 release.
Steps to Reproduce
Run this in a clean checkout of pyo3:
cargo test --no-default-features --features "full" --test test_compile_error
On my mac, with rust 1.80.0 installed, this test fails.
Backtrace
There are two failed tests, but one of them has shorter output and it's easier to read what the difference is:EXPECTED:┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈error[E0277]: the trait bound `i32: TryFrom<BoundRef<'_, '_, MyClass>>` is not satisfied --> tests/ui/invalid_pymethod_receiver.rs:8:44 |8 | fn method_with_invalid_self_type(_slf: i32, _py: Python<'_>, _index: u32) {}
| ^^^ the trait `From<BoundRef<'_, '_, MyClass>>` is not implemented for`i32`, which is required by `i32: TryFrom<BoundRef<'_, '_, MyClass>>`|
= help: the following other types implement trait `From<T>`:
<i32 as From<bool>><i32 as From<i16>><i32 as From<i8>><i32 as From<u16>><i32 as From<u8>>
= note: required for`BoundRef<'_, '_, MyClass>` to implement `Into<i32>`
= note: required for`i32` to implement `TryFrom<BoundRef<'_, '_, MyClass>>`
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
ACTUAL OUTPUT:
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error[E0277]: the trait bound `i32: TryFrom<BoundRef<'_, '_, MyClass>>` is not satisfied
--> tests/ui/invalid_pymethod_receiver.rs:8:44
|
8 | fn method_with_invalid_self_type(_slf: i32, _py: Python<'_>, _index: u32) {} | ^^^ the trait `From<BoundRef<'_, '_, MyClass>>` is not implemented for `i32`, which is required by `i32: TryFrom<BoundRef<'_, '_, MyClass>>` | = help: the following other types implement trait `From<T>`: <i32 as From<bool>> <i32 as From<i16>> <i32 as From<i8>> <i32 as From<u16>> <i32 as From<u8>> <i32 as From<zerocopy::byteorder::I16<O>>> <i32 as From<zerocopy::byteorder::I32<O>>> = note: required for `BoundRef<'_, '_, MyClass>` to implement `Into<i32>` = note: required for `i32` to implement `TryFrom<BoundRef<'_, '_, MyClass>>`┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈note: If the actual output is the correct output you can bless it by rerunning your test with the environment variable TRYBUILD=overwrite
### Your operating system and version
MacOS Sonoma
### Your Python version (`python --version`)
3.12.3
### Your Rust version (`rustc --version`)
1.80.0
### Your PyO3 version
current `main` branch
### How did you install python? Did you use a virtualenv?
pyenv, no virtualenv
### Additional Info
_No response_
The text was updated successfully, but these errors were encountered:
Bug Description
The
test_compiler_errors
are failing due to a recent upstream change in eitherzerocopy
or because of the rust 1.80.0 release.Steps to Reproduce
Run this in a clean checkout of pyo3:
On my mac, with rust 1.80.0 installed, this test fails.
Backtrace
The text was updated successfully, but these errors were encountered: