1
Fork 0

Change unsafe_op_in_unsafe_fn to be warn-by-default from edition 2024

This commit is contained in:
Wim Looman 2023-05-27 13:00:51 +02:00
parent 51a9df8c70
commit 119e0fff8a
No known key found for this signature in database
GPG key ID: C6F5748C6DD1607B
4 changed files with 40 additions and 18 deletions

View file

@ -2554,8 +2554,8 @@ declare_lint! {
///
/// The fix to this is to wrap the unsafe code in an `unsafe` block.
///
/// This lint is "allow" by default since this will affect a large amount
/// of existing code, and the exact plan for increasing the severity is
/// This lint is "allow" by default on editions up to 2021, from 2024 it is
/// "warn" by default; the plan for increasing severity further is
/// still being considered. See [RFC #2585] and [issue #71668] for more
/// details.
///
@ -2567,6 +2567,7 @@ declare_lint! {
pub UNSAFE_OP_IN_UNSAFE_FN,
Allow,
"unsafe operations in unsafe functions without an explicit unsafe block are deprecated",
@edition Edition2024 => Warn;
}
declare_lint! {