diff options
| author | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-06-27 18:24:24 +0200 |
|---|---|---|
| committer | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-06-27 18:24:24 +0200 |
| commit | 89d8e0a2606a77edcc73533e4aee96c5a728a79f (patch) | |
| tree | 40556c6738f29d7d6c5811d7e67d8155254bcfa9 /src/librustc_mir/interpret | |
| parent | c20824323cf7ed6ad95cb8d7b780a7934927a753 (diff) | |
| download | rust-89d8e0a2606a77edcc73533e4aee96c5a728a79f.tar.gz rust-89d8e0a2606a77edcc73533e4aee96c5a728a79f.zip | |
Don't use `ParamEnv::reveal_all()` if there is a real one available
Diffstat (limited to 'src/librustc_mir/interpret')
| -rw-r--r-- | src/librustc_mir/interpret/const_eval.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_mir/interpret/const_eval.rs b/src/librustc_mir/interpret/const_eval.rs index 3fcf1b5c8ed..592c9dbe6ff 100644 --- a/src/librustc_mir/interpret/const_eval.rs +++ b/src/librustc_mir/interpret/const_eval.rs @@ -76,7 +76,7 @@ pub fn value_to_const_value<'tcx>( val: Value, ty: Ty<'tcx>, ) -> &'tcx ty::Const<'tcx> { - let layout = ecx.tcx.layout_of(ty::ParamEnv::reveal_all().and(ty)).unwrap(); + let layout = ecx.layout_of(ty).unwrap(); match (val, &layout.abi) { (Value::Scalar(Scalar::Bits { defined: 0, ..}), _) if layout.is_zst() => {}, (Value::ByRef(..), _) | |
