library: use strict provenance lints consistently#156832
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
49b7330 to
ce7d549
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ba63f5d to
2509ca0
Compare
|
The CI failure is due to a clippy lint using
The "invalid span" warnings seems to caused by a mix of that clippy issue ( I didn't find an easy workaround for the clippy bug that I'd be comfortable including in this PR. So I'll try moving the strict provenance lints out of the HIR typechecking path and convert them to normal late lints (edit: opened #156862 for this). So this PR should be ready for review in theory, but can't pass CI until I've either done that or someone finds another fix for rust-lang/rust-clippy#17063 @rustbot blocked |
This comment has been minimized.
This comment has been minimized.
2509ca0 to
02378db
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
The `fuzzy_provenance_casts` lint is enabled in most of the standard library, but its identical twin `lossy_provenance_casts` was not. As discussed in the tracking issue for those lints, there doesn't seem to be any good reason to enable one without the other. This PR applies this principle and as a result removes some unnecessary ptr->int `as` casts. It's also preparation for merging the two lints, which removes the option of only enabling `fuzzy_provenance_casts`.
02378db to
fed6279
Compare
|
r? jhpratt @bors r+ |
…venance-lints, r=jhpratt library: use strict provenance lints consistently The `fuzzy_provenance_casts` lint is enabled in most of the standard library, but its identical twin `lossy_provenance_casts` was not. As discussed in the tracking issue for those lints, there doesn't seem to be any good reason to enable one without the other. This PR applies this principle and as a result removes some unnecessary ptr->int `as` casts. It's also preparation for merging the two lints, which removes the option of only enabling `fuzzy_provenance_casts`. Tracking issue: rust-lang#130351
Rollup of 6 pull requests Successful merges: - #156832 (library: use strict provenance lints consistently) - #157006 (net tests: let the OS pick the port numbers) - #157126 (Avoid redundant note when a #[derive] is already suggested) - #151690 (std: Refactor `env::var` function) - #155826 (std::process: uefi: avoid panicking in Stdio From impls.) - #156109 (Migrate libraries from ptr::slice_from_raw_parts to .cast_slice)
|
⌛ Testing commit fed6279 with merge 6402f0d... Workflow: https://github.com/rust-lang/rust/actions/runs/26694683369 |
…ts, r=jhpratt library: use strict provenance lints consistently The `fuzzy_provenance_casts` lint is enabled in most of the standard library, but its identical twin `lossy_provenance_casts` was not. As discussed in the tracking issue for those lints, there doesn't seem to be any good reason to enable one without the other. This PR applies this principle and as a result removes some unnecessary ptr->int `as` casts. It's also preparation for merging the two lints, which removes the option of only enabling `fuzzy_provenance_casts`. Tracking issue: #130351
|
💔 This PR failed tests as part of a rollup Link to failure: |
|
This pull request was unapproved. This PR was contained in a rollup (#157167), which was unapproved. Auto build was cancelled due to unapproval. Cancelled workflows: |
|
Added a commit that should fix that failure. @bors ready |
|
Unknown command "ready". Run |
|
@rustbot ready |

The
fuzzy_provenance_castslint is enabled in most of the standard library, but its identical twinlossy_provenance_castswas not. As discussed in the tracking issue for those lints, there doesn't seem to be any good reason to enable one without the other. This PR applies this principle and as a result removes some unnecessary ptr->intascasts.It's also preparation for merging the two lints, which removes the option of only enabling
fuzzy_provenance_casts.Tracking issue: #130351