Make ptr_cast_add_auto_to_object
lint into hard error by traviscross · Pull Request #136764 · rust-lang/rust (original) (raw)
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
traviscross added the T-lang
Relevant to the language team, which will review and decide on the PR/issue.
label
This comment was marked as resolved.
This comment has been minimized.
@bors try
...in preparation for a crater run.
bors added a commit to rust-lang-ci/rust that referenced this pull request
…o_to_object-hard-error, r=
Make ptr_cast_add_auto_to_object
lint into hard error
In Rust 1.81, we added a FCW lint (including linting in dependencies) against pointer casts that add an auto trait to dyn bounds. This was part of work making casts of pointers involving trait objects stricter, and was part of the work needed to restabilize trait upcasting.
We considered just making this a hard error, but opted against it at that time due to breakage found by crater. This breakage was mostly due to the anymap
crate which has been a persistent problem for us.
It's now a year later, and the fact that this is not yet a hard error is giving us pause about stabilizing arbitrary self types and derive(CoercePointee)
. So let's see about making a hard error of this.
r? ghost
cc @adetaylor
@Darksonn
@BoxyUwU
@RalfJung
@compiler-errors
@oli-obk
@WaffleLapkin
Related:
Tracking:
☀️ Try build successful - checks-actions
Build commit: 8cf44c8 (8cf44c88fc5805dc578c5c987397615b47d2e2b2
)
🚧 Experiment pr-136764
is now running
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more
@rustbot labels +I-lang-nominated
As expected, all the real regressions are due to anymap
. Let's discuss what we want to do here.
cc @rust-lang/lang
We talked about this in triage today. The feeling is that the FCW has been out there long enough, so we're within our rights to do this.
@rfcbot fcp merge
traviscross removed the T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
label
This comment was marked as resolved.
This comment was marked as resolved.
In Rust 1.81, we added a FCW lint (including linting in dependencies) against pointer casts that add an auto trait to dyn bounds. This was part of work making casts of pointers involving trait objects stricter which was needed to restabilize trait upcasting.
We considered just making this a hard error at the time, but opted
against it due to breakage found by crater. This breakage was mostly
due to the anymap
crate which has been a persistent problem for us.
It's now a year later, and the fact that this is not yet a hard error
is giving us pause about stabilizing arbitrary self types and
derive(CoercePointee)
. So let's now make a hard error of this.
📌 Commit ef337a6 has been approved by oli-obk
It is now in the queue for this repository.
bors added S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request
…uto_to_object-hard-error, r=oli-obk
Make ptr_cast_add_auto_to_object
lint into hard error
In Rust 1.81, we added a FCW lint (including linting in dependencies) against pointer casts that add an auto trait to dyn bounds. This was part of work making casts of pointers involving trait objects stricter, and was part of the work needed to restabilize trait upcasting.
We considered just making this a hard error, but opted against it at that time due to breakage found by crater. This breakage was mostly due to the anymap
crate which has been a persistent problem for us.
It's now a year later, and the fact that this is not yet a hard error is giving us pause about stabilizing arbitrary self types and derive(CoercePointee)
. So let's see about making a hard error of this.
r? ghost
cc @adetaylor
@Darksonn
@BoxyUwU
@RalfJung
@compiler-errors
@oli-obk
@WaffleLapkin
Related:
Tracking:
bors added a commit to rust-lang-ci/rust that referenced this pull request
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request
…uto_to_object-hard-error, r=oli-obk
Make ptr_cast_add_auto_to_object
lint into hard error
In Rust 1.81, we added a FCW lint (including linting in dependencies) against pointer casts that add an auto trait to dyn bounds. This was part of work making casts of pointers involving trait objects stricter, and was part of the work needed to restabilize trait upcasting.
We considered just making this a hard error, but opted against it at that time due to breakage found by crater. This breakage was mostly due to the anymap
crate which has been a persistent problem for us.
It's now a year later, and the fact that this is not yet a hard error is giving us pause about stabilizing arbitrary self types and derive(CoercePointee)
. So let's see about making a hard error of this.
r? ghost
cc @adetaylor
@Darksonn
@BoxyUwU
@RalfJung
@compiler-errors
@oli-obk
@WaffleLapkin
Related:
Tracking:
bors added a commit to rust-lang-ci/rust that referenced this pull request
…kingjubilee
Rollup of 20 pull requests
Successful merges:
- rust-lang#136581 (Retire the legacy
Makefile
-basedrun-make
test infra) - rust-lang#136764 (Make
ptr_cast_add_auto_to_object
lint into hard error) - rust-lang#136798 (Added documentation for flushing per rust-lang#74348)
- rust-lang#136865 (Perform deeper compiletest path normalization for
$TEST_BUILD_DIR
to account for compare-mode/debugger cases, and normalize long type file filename hashes) - rust-lang#136975 (Look for
python3
first on MacOS, notpy
) - rust-lang#137240 (Slightly reformat
std::fs::remove_dir_all
error docs) - rust-lang#137303 (Remove
MaybeForgetReturn
suggestion) - rust-lang#137327 (Undeprecate env::home_dir)
- rust-lang#137502 (Don't include global asm in
mir_keys
, fix error body synthesis) - rust-lang#137534 ([rustdoc] hide item that is not marked as doc(inline) and whose src is doc(hidden))
- rust-lang#137565 (Try to point of macro expansion from resolver and method errors if it involves macro var)
- rust-lang#137643 (Add DWARF test case for non-C-like
repr128
enums) - rust-lang#137758 (fix usage of ty decl macro fragments in attributes)
- rust-lang#137764 (Ensure that negative auto impls are always applicable)
- rust-lang#137772 (Fix char count in
Display
forByteStr
) - rust-lang#137798 (ci: use ubuntu 24 on arm large runner)
- rust-lang#137805 (adjust Layout debug printing to match the internal field name)
- rust-lang#137808 (Do not require that unsafe fields lack drop glue)
- rust-lang#137820 (Clarify why InhabitedPredicate::instantiate_opt exists)
- rust-lang#137825 (Provide more context on resolve error caused from incorrect RTN)
r? @ghost
@rustbot
modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
Rollup merge of rust-lang#136764 - traviscross:TC/make-ptr_cast_add_auto_to_object-hard-error, r=oli-obk
Make ptr_cast_add_auto_to_object
lint into hard error
In Rust 1.81, we added a FCW lint (including linting in dependencies) against pointer casts that add an auto trait to dyn bounds. This was part of work making casts of pointers involving trait objects stricter, and was part of the work needed to restabilize trait upcasting.
We considered just making this a hard error, but opted against it at that time due to breakage found by crater. This breakage was mostly due to the anymap
crate which has been a persistent problem for us.
It's now a year later, and the fact that this is not yet a hard error is giving us pause about stabilizing arbitrary self types and derive(CoercePointee)
. So let's see about making a hard error of this.
r? ghost
cc @adetaylor
@Darksonn
@BoxyUwU
@RalfJung
@compiler-errors
@oli-obk
@WaffleLapkin
Related:
Tracking:
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
…leLapkin
Don't emit error within cast function, propagate it as a CastError
Minor nitpick from rust-lang#136764.
r? @WaffleLapkin
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
Rollup merge of rust-lang#138423 - compiler-errors:delay-emit, r=WaffleLapkin
Don't emit error within cast function, propagate it as a CastError
Minor nitpick from rust-lang#136764.
r? @WaffleLapkin
Labels
This issue / PR is in PFCP or FCP with a disposition to merge it.
The final comment period is finished for this PR / Issue.
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the language team, which will review and decide on the PR/issue.