Apply noundef attribute to all scalar types which do not permit raw init by erik...
source link: https://github.com/rust-lang/rust/pull/94157
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Beyond &
/&mut
/Box
, this covers char
, enum discriminants, NonZero*
, etc.
All such types currently cause a Miri error if left uninitialized,
and an invalid_value
lint in cases like mem::uninitialized::<char>()
.
Note that this does not change whether or not it is UB for u64
(or
other integer types with no invalid values) to be undef.
Fixes (partially) #74378.
@rustbot label S-blocked
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK