Skip to content
Permalink
Browse files

Fixup: eval_usize needs param env

  • Loading branch information...
oli-obk committed May 26, 2019
1 parent 2d86d04 commit 7385f2177f8e3b66ec8f506ed8ec9689460a9b85
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/librustc_mir/hair/pattern/_match.rs
@@ -228,7 +228,7 @@ impl LiteralExpander<'tcx> {
ConstValue::Slice {
data: self.tcx.alloc_map.lock().unwrap_memory(p.alloc_id),
start: p.offset.bytes().try_into().unwrap(),
end: n.eval_usize(self.tcx, ty::ParamEnv::reveal_all()).try_into().unwrap(),
end: n.eval_usize(self.tcx, ty::ParamEnv::empty()).try_into().unwrap(),
}
},
// fat pointers stay the same

0 comments on commit 7385f21

Please sign in to comment.
You can’t perform that action at this time.