1
Fork 0

switch back to 'bytes'

This commit is contained in:
Ralf Jung 2020-04-16 13:19:51 +02:00
commit 0d01ce6a1b
2 changed files with 2 additions and 2 deletions

View file

@ -788,7 +788,7 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
.unwrap(); .unwrap();
self.path.push(PathElem::ArrayElem(i)); self.path.push(PathElem::ArrayElem(i));
throw_validation_failure!("uninitialized value", self.path) throw_validation_failure!("uninitialized bytes", self.path)
} }
// Other errors shouldn't be possible // Other errors shouldn't be possible
_ => return Err(err), _ => return Err(err),

View file

@ -27,7 +27,7 @@ LL | | unsafe { UNION.field3 },
... | ... |
LL | | a: 42, LL | | a: 42,
LL | | }; LL | | };
| |__^ type validation failed: encountered uninitialized value at .b[1] | |__^ type validation failed: encountered uninitialized bytes at .b[1]
| |
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior. = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.