1
Fork 0

Use exhaustive match in const_prop.rs

This commit is contained in:
Wesley Wiser 2020-06-24 08:49:09 -04:00
parent 0ca7f74dbd
commit b4d045719d

View file

@ -638,8 +638,20 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {
return None; return None;
} }
Rvalue::ThreadLocalRef(def_id) => {
trace!("skipping ThreadLocalRef({:?})", def_id);
_ => {} return None;
}
// There's no other checking to do at this time.
Rvalue::Aggregate(..)
| Rvalue::Use(..)
| Rvalue::Repeat(..)
| Rvalue::Len(..)
| Rvalue::Cast(..)
| Rvalue::Discriminant(..)
| Rvalue::NullaryOp(..) => {}
} }
// FIXME we need to revisit this for #67176 // FIXME we need to revisit this for #67176