Skip to content

Commit

Permalink
Rollup merge of #136764 - traviscross:TC/make-ptr_cast_add_auto_to_ob…
Browse files Browse the repository at this point in the history
…ject-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:

- rust-lang/rust#135881
- rust-lang/rust#136702
- rust-lang/rust#136776

Tracking:

- rust-lang/rust#127323
- rust-lang/rust#44874
- rust-lang/rust#123430
  • Loading branch information
jieyouxu authored Mar 5, 2025
2 parents 6393814 + 654035f commit 9371ec7
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 9371ec7

Please sign in to comment.