Skip to content

Commit 7ba06ec

Browse files
committed
Auto merge of rust-lang#98919 - 5225225:stricter-invalid-value, r=RalfJung
Strengthen invalid_value lint to forbid uninit primitives, adjust docs to say that's UB For context: rust-lang#66151 (comment) This does not make it a FCW, but it does explicitly state in the docs that uninit integers are UB. This also doesn't affect any runtime behavior, uninit u32's will still successfully be created through mem::uninitialized.
2 parents ce847be + 98fe5f7 commit 7ba06ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/ui/uninit.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![feature(stmt_expr_attributes)]
2-
#![allow(clippy::let_unit_value)]
2+
#![allow(clippy::let_unit_value, invalid_value)]
33

44
use std::mem::{self, MaybeUninit};
55

0 commit comments

Comments
 (0)