diff options
| author | Wesley Wiser <wwiser@gmail.com> | 2020-06-24 08:49:09 -0400 |
|---|---|---|
| committer | Wesley Wiser <wwiser@gmail.com> | 2020-06-30 20:50:47 -0400 |
| commit | b4d045719d77e40f294eb85d8e5cf8143d661718 (patch) | |
| tree | b749e8e299d537183386dc02103f951977d2b44e | |
| parent | 0ca7f74dbd23a3e8ec491cd3438f490a3ac22741 (diff) | |
| download | rust-b4d045719d77e40f294eb85d8e5cf8143d661718.tar.gz rust-b4d045719d77e40f294eb85d8e5cf8143d661718.zip | |
Use exhaustive match in const_prop.rs
| -rw-r--r-- | src/librustc_mir/transform/const_prop.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/librustc_mir/transform/const_prop.rs b/src/librustc_mir/transform/const_prop.rs index 2c1565b5426..e4c1ca4e851 100644 --- a/src/librustc_mir/transform/const_prop.rs +++ b/src/librustc_mir/transform/const_prop.rs @@ -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 |
