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_infer/src | |
| parent | ddbc774e74c4c6d7d0f2fb28d2d25766fcfee318 (diff) | |
| download | rust-d30f56dbf22781c653539b15a687cb2c2883bb5f.tar.gz rust-d30f56dbf22781c653539b15a687cb2c2883bb5f.zip | |
Replace `const_error` methods with `Const::new_error`
Diffstat (limited to 'compiler/rustc_infer/src')
| -rw-r--r-- | compiler/rustc_infer/src/infer/combine.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_infer/src/infer/combine.rs b/compiler/rustc_infer/src/infer/combine.rs index fc6ff01c00c..0b93b6b9f27 100644 --- a/compiler/rustc_infer/src/infer/combine.rs +++ b/compiler/rustc_infer/src/infer/combine.rs @@ -189,11 +189,11 @@ impl<'tcx> InferCtxt<'tcx> { // HACK: equating both sides with `[const error]` eagerly prevents us // from leaving unconstrained inference vars during things like impl // matching in the solver. - let a_error = self.tcx.const_error(a.ty(), guar); + let a_error = ty::Const::new_error(self.tcx, guar, a.ty()); if let ty::ConstKind::Infer(InferConst::Var(vid)) = a.kind() { return self.unify_const_variable(vid, a_error, relation.param_env()); } - let b_error = self.tcx.const_error(b.ty(), guar); + let b_error = ty::Const::new_error(self.tcx, guar, b.ty()); if let ty::ConstKind::Infer(InferConst::Var(vid)) = b.kind() { return self.unify_const_variable(vid, b_error, relation.param_env()); } |
