diff options
| author | mark <markm@cs.wisc.edu> | 2022-01-23 12:34:26 -0600 |
|---|---|---|
| committer | mark <markm@cs.wisc.edu> | 2022-03-02 09:45:25 -0600 |
| commit | e489a94deef3d41513fe4254804d730f0fd6cbc0 (patch) | |
| tree | d2c3743151e614831817cb8c27487a820826cc29 /compiler/rustc_const_eval/src/interpret/intern.rs | |
| parent | c42d846add941a26bd254911e16f02c4a3f9346f (diff) | |
| download | rust-e489a94deef3d41513fe4254804d730f0fd6cbc0.tar.gz rust-e489a94deef3d41513fe4254804d730f0fd6cbc0.zip | |
rename ErrorReported -> ErrorGuaranteed
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/intern.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/intern.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/intern.rs b/compiler/rustc_const_eval/src/interpret/intern.rs index b1f50bc56c9..2096addb9f7 100644 --- a/compiler/rustc_const_eval/src/interpret/intern.rs +++ b/compiler/rustc_const_eval/src/interpret/intern.rs @@ -16,7 +16,7 @@ use super::validity::RefTracking; use rustc_data_structures::fx::{FxHashMap, FxHashSet}; -use rustc_errors::ErrorReported; +use rustc_errors::ErrorGuaranteed; use rustc_hir as hir; use rustc_middle::mir::interpret::InterpResult; use rustc_middle::ty::{self, layout::TyAndLayout, Ty}; @@ -297,7 +297,7 @@ pub fn intern_const_alloc_recursive< ecx: &mut InterpCx<'mir, 'tcx, M>, intern_kind: InternKind, ret: &MPlaceTy<'tcx>, -) -> Result<(), ErrorReported> { +) -> Result<(), ErrorGuaranteed> { let tcx = ecx.tcx; let base_intern_mode = match intern_kind { InternKind::Static(mutbl) => InternMode::Static(mutbl), @@ -402,7 +402,7 @@ pub fn intern_const_alloc_recursive< // Codegen does not like dangling pointers, and generally `tcx` assumes that // all allocations referenced anywhere actually exist. So, make sure we error here. ecx.tcx.sess.span_err(ecx.tcx.span, "encountered dangling pointer in final constant"); - return Err(ErrorReported); + return Err(ErrorGuaranteed); } else if ecx.tcx.get_global_alloc(alloc_id).is_none() { // We have hit an `AllocId` that is neither in local or global memory and isn't // marked as dangling by local memory. That should be impossible. |
