about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/reference_casting.rs
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2023-07-06 21:50:34 +0200
committerUrgau <urgau@numericable.fr>2023-07-13 23:01:24 +0200
commitf25ad54a4d0febbcb2b7e951835228b7b2320b49 (patch)
tree6c311f4b5d90e36365edd401a7ce5ff328040a18 /compiler/rustc_lint/src/reference_casting.rs
parentfa15df6f5a85ceb5919a47bb721a337c7b8f0adc (diff)
downloadrust-f25ad54a4d0febbcb2b7e951835228b7b2320b49.tar.gz
rust-f25ad54a4d0febbcb2b7e951835228b7b2320b49.zip
Temporarily switch invalid_reference_casting lint to allow-by-default
Diffstat (limited to 'compiler/rustc_lint/src/reference_casting.rs')
-rw-r--r--compiler/rustc_lint/src/reference_casting.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/reference_casting.rs b/compiler/rustc_lint/src/reference_casting.rs
index 1a172dd6942..d343aaf35d5 100644
--- a/compiler/rustc_lint/src/reference_casting.rs
+++ b/compiler/rustc_lint/src/reference_casting.rs
@@ -12,6 +12,7 @@ declare_lint! {
     /// ### Example
     ///
     /// ```rust,compile_fail
+    /// # #![deny(invalid_reference_casting)]
     /// fn x(r: &i32) {
     ///     unsafe {
     ///         *(r as *const i32 as *mut i32) += 1;
@@ -29,7 +30,7 @@ declare_lint! {
     /// `UnsafeCell` is the only way to obtain aliasable data that is considered
     /// mutable.
     INVALID_REFERENCE_CASTING,
-    Deny,
+    Allow,
     "casts of `&T` to `&mut T` without interior mutability"
 }