about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-02-27 21:41:06 +0000
committerbors <bors@rust-lang.org>2022-02-27 21:41:06 +0000
commit9fbff89354ba7a4ec2d1191a3f405cbe408370f6 (patch)
treebe5786736399ab8be46745ceb4239a9155b5ac79 /compiler/rustc_codegen_gcc
parent6a705566166debf5eff88c57140df607fa409aaa (diff)
parent45ee3fc700950da07e0682c6bf56b9c123fbf995 (diff)
downloadrust-9fbff89354ba7a4ec2d1191a3f405cbe408370f6.tar.gz
rust-9fbff89354ba7a4ec2d1191a3f405cbe408370f6.zip
Auto merge of #94157 - erikdesjardins:more-noundef, r=nikic
Apply noundef attribute to all scalar types which do not permit raw init

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.

r? `@ghost` (blocked on #94127)

`@rustbot` label S-blocked
Diffstat (limited to 'compiler/rustc_codegen_gcc')
0 files changed, 0 insertions, 0 deletions