diff options
| author | bors <bors@rust-lang.org> | 2022-06-18 00:02:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-06-18 00:02:52 +0000 |
| commit | aaf100597cc6986d5ebd005d58a9394dd6edef4d (patch) | |
| tree | f5199e2442f3fdc5040840843fa9b57d88d6f124 /compiler | |
| parent | c3b7d7b496b5536bb0a3d501222d2d0a8b54a69e (diff) | |
| parent | f6b41e346b9cd20d26b5196ba622137e43fc8a5c (diff) | |
| download | rust-aaf100597cc6986d5ebd005d58a9394dd6edef4d.tar.gz rust-aaf100597cc6986d5ebd005d58a9394dd6edef4d.zip | |
Auto merge of #97652 - RalfJung:cenum_impl_drop_cast, r=nagisa
make cenum_impl_drop_cast deny-by-default Also make it show up as future breakage diagnostic. In https://github.com/rust-lang/rust/pull/96862 we are proposing to change behavior of those drops *again*, so this looks like a good opportunity to increase our pressure on getting them out of the ecosystem. Looking at the [tracking issue](https://github.com/rust-lang/rust/issues/73333), so far nobody spoke up in favor of this (accidental) feature. Cc https://github.com/rust-lang/rust/issues/73333 `@oli-obk`
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_lint_defs/src/builtin.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_lint_defs/src/builtin.rs b/compiler/rustc_lint_defs/src/builtin.rs index a067534b189..b1bfd612b90 100644 --- a/compiler/rustc_lint_defs/src/builtin.rs +++ b/compiler/rustc_lint_defs/src/builtin.rs @@ -1154,7 +1154,6 @@ declare_lint! { /// ### Example /// /// ```compile_fail - /// #![deny(unaligned_references)] /// #[repr(packed)] /// pub struct Foo { /// field1: u64, @@ -2614,7 +2613,7 @@ declare_lint! { /// /// ### Example /// - /// ```rust + /// ```compile_fail /// # #![allow(unused)] /// enum E { /// A, @@ -2650,10 +2649,11 @@ declare_lint! { /// [issue #73333]: https://github.com/rust-lang/rust/issues/73333 /// [`Copy`]: https://doc.rust-lang.org/std/marker/trait.Copy.html pub CENUM_IMPL_DROP_CAST, - Warn, + Deny, "a C-like enum implementing Drop is cast", @future_incompatible = FutureIncompatibleInfo { reference: "issue #73333 <https://github.com/rust-lang/rust/issues/73333>", + reason: FutureIncompatibilityReason::FutureReleaseErrorReportNow, }; } |
