diff options
| author | Boxy <supbscripter@gmail.com> | 2023-07-04 14:46:32 +0100 |
|---|---|---|
| committer | Boxy <supbscripter@gmail.com> | 2023-07-04 14:46:32 +0100 |
| commit | d30f56dbf22781c653539b15a687cb2c2883bb5f (patch) | |
| tree | 226c23ae633fc95eab20d9112bec5f8bdf787f7a /compiler/rustc_ty_utils/src/consts.rs | |
| parent | ddbc774e74c4c6d7d0f2fb28d2d25766fcfee318 (diff) | |
| download | rust-d30f56dbf22781c653539b15a687cb2c2883bb5f.tar.gz rust-d30f56dbf22781c653539b15a687cb2c2883bb5f.zip | |
Replace `const_error` methods with `Const::new_error`
Diffstat (limited to 'compiler/rustc_ty_utils/src/consts.rs')
| -rw-r--r-- | compiler/rustc_ty_utils/src/consts.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_ty_utils/src/consts.rs b/compiler/rustc_ty_utils/src/consts.rs index b414d889358..8cc75a6e2e3 100644 --- a/compiler/rustc_ty_utils/src/consts.rs +++ b/compiler/rustc_ty_utils/src/consts.rs @@ -119,7 +119,7 @@ fn recurse_build<'tcx>( let sp = node.span; match tcx.at(sp).lit_to_const(LitToConstInput { lit: &lit.node, ty: node.ty, neg }) { Ok(c) => c, - Err(LitToConstError::Reported(guar)) => tcx.const_error(node.ty, guar), + Err(LitToConstError::Reported(guar)) => ty::Const::new_error(tcx, guar, node.ty), Err(LitToConstError::TypeError) => { bug!("encountered type error in lit_to_const") } |
