Accidentally used byte-size instead of bit-size

This commit is contained in:
Oliver Schneider 2018-05-22 16:17:19 +02:00
parent 4ca169ce84
commit 9456ba66bf

View file

@ -1150,7 +1150,7 @@ impl<'tcx> TerminatorKind<'tcx> {
Goto { .. } => vec!["".into()],
SwitchInt { ref values, switch_ty, .. } => {
let size = ty::tls::with(|tcx| switch_ty.scalar_size(tcx));
let size = size.map_or(0, |size| size.bytes()) as u8;
let size = size.map_or(0, |size| size.bits()) as u8;
values.iter()
.map(|&u| {
let mut s = String::new();