diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2020-04-16 13:47:47 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2020-04-16 19:00:30 +0300 |
| commit | 2deb39dd1fd7525eedbb9067ca52dfa71eed4fab (patch) | |
| tree | 21211b7221818e81648df00e86819dc8b86a26a2 /src/librustc_mir/interpret | |
| parent | 4e4d49d60fd696c4036d438292673a2d7fd34519 (diff) | |
| download | rust-2deb39dd1fd7525eedbb9067ca52dfa71eed4fab.tar.gz rust-2deb39dd1fd7525eedbb9067ca52dfa71eed4fab.zip | |
ty: add `ty::ConstKind::Error` to replace `tcx.consts.err`.
Diffstat (limited to 'src/librustc_mir/interpret')
| -rw-r--r-- | src/librustc_mir/interpret/operand.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustc_mir/interpret/operand.rs b/src/librustc_mir/interpret/operand.rs index 893f4c1db7e..648c1f5347c 100644 --- a/src/librustc_mir/interpret/operand.rs +++ b/src/librustc_mir/interpret/operand.rs @@ -518,6 +518,7 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> { // Early-return cases. let val_val = match val.val { ty::ConstKind::Param(_) => throw_inval!(TooGeneric), + ty::ConstKind::Error => throw_inval!(TypeckError), ty::ConstKind::Unevaluated(def_id, substs, promoted) => { let instance = self.resolve(def_id, substs)?; // We use `const_eval` here and `const_eval_raw` elsewhere in mir interpretation. |
