Skip to content

Commit

Permalink
Rollup merge of rust-lang#73693 - wesleywiser:const_prop_exhaustive_m…
Browse files Browse the repository at this point in the history
…atch, r=oli-obk

Use exhaustive match in const_prop.rs

Addresses a comment left by @RalfJung on rust-lang#73613

r? @RalfJung
  • Loading branch information
Manishearth authored Jul 4, 2020
2 parents 4a8d9ea + b4d0457 commit 50dcefc
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/librustc_mir/transform/const_prop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,8 +638,20 @@ impl<'mir, 'tcx> ConstPropagator<'mir, 'tcx> {

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
Expand Down

0 comments on commit 50dcefc

Please sign in to comment.