1
Fork 0

Use "must be init" instead of "must not be uninit" everywhere

This commit is contained in:
Oli Scherer 2022-11-07 10:52:48 +00:00
parent 5446a52b4b
commit 208bb933e7
2 changed files with 14 additions and 16 deletions

View file

@ -2568,13 +2568,11 @@ impl<'tcx> LateLintPass<'tcx> for InvalidValue {
Some("characters must be a valid Unicode codepoint".into())
}
Int(_) | Uint(_) if init == InitKind::Uninit => {
Some("integers must not be uninitialized".into())
}
Float(_) if init == InitKind::Uninit => {
Some("floats must not be uninitialized".into())
Some("integers must be initialized".into())
}
Float(_) if init == InitKind::Uninit => Some("floats must be initialized".into()),
RawPtr(_) if init == InitKind::Uninit => {
Some("raw pointers must not be uninitialized".into())
Some("raw pointers must be initialized".into())
}
// Recurse and checks for some compound types. (but not unions)
Adt(adt_def, substs) if !adt_def.is_union() => {