From ef337a6599145766fc73b2896c6ff3e0fef65b0b Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Sun, 9 Feb 2025 06:08:59 +0000 Subject: 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 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. --- compiler/rustc_error_codes/src/lib.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'compiler/rustc_error_codes/src/lib.rs') diff --git a/compiler/rustc_error_codes/src/lib.rs b/compiler/rustc_error_codes/src/lib.rs index 098ca42be2b..d53d5678832 100644 --- a/compiler/rustc_error_codes/src/lib.rs +++ b/compiler/rustc_error_codes/src/lib.rs @@ -547,6 +547,7 @@ E0800: 0800, E0801: 0801, E0802: 0802, E0803: 0803, +E0804: 0804, ); ) } -- cgit 1.4.1-3-g733a5