Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: allow some dead code warnings on nightly #3813

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

davidhewitt
Copy link
Member

Looks like the latest nightly has got some better dead code detection for unused trait methods. While that's very welcome, the careful job is blocking merges due to this new warning.

On the main nightly job, this is also being emitted as an error:

warning: method `downcast_into` is never used
  --> src/py_result_ext.rs:14:8
   |
13 | pub(crate) trait PyResultExt<'py>: Sealed {
   |                  ----------- method in this trait
14 |     fn downcast_into<T: PyTypeCheck>(self) -> PyResult<Bound<'py, T>>;
   |        ^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

I'm pretty sure we'll use that downcast_into method soon in #3703 or similar, so I'm going to just leave nightly broken in the very short term. I think the PR diff here should be sufficient to fix careful.

Will proceed straight to merge to unblock CI.

@davidhewitt davidhewitt added the CI-skip-changelog Skip checking changelog entry label Feb 8, 2024
@davidhewitt
Copy link
Member Author

Ah, we've also had rust 1.76 release today, so I've pushed a second commit to update the trybuild output.

Thanks to the beta clippy job we've not had any new clippy changes from the release, so updating was refreshingly easy!

@davidhewitt davidhewitt added this pull request to the merge queue Feb 8, 2024
Copy link

codspeed-hq bot commented Feb 8, 2024

CodSpeed Performance Report

Merging #3813 will degrade performances by 12.82%

Comparing davidhewitt:nightly-2024-02-08 (bcb7b88) with main (030a618)

Summary

⚡ 3 improvements
❌ 2 regressions
✅ 74 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main davidhewitt:nightly-2024-02-08 Change
sequence_from_list 355.6 ns 300 ns +18.52%
not_a_list_via_downcast 242.8 ns 272.2 ns -10.82%
list_via_extract 336.7 ns 281.1 ns +19.76%
list_via_downcast 185 ns 157.2 ns +17.67%
f64_from_pyobject 377.8 ns 433.3 ns -12.82%

@davidhewitt
Copy link
Member Author

@adamreichold here's immediately a PR following #3811 where I couldn't split it out into two because stable and nightly were both broken in CI, and keeping two commits made sense 🙈

Merged via the queue into PyO3:main with commit 9bb0011 Feb 8, 2024
36 of 38 checks passed
@davidhewitt davidhewitt deleted the nightly-2024-02-08 branch February 8, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-skip-changelog Skip checking changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant