about summary refs log tree commit diff
path: root/compiler/rustc_infer/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-06-04 14:49:54 +0000
committerbors <bors@rust-lang.org>2024-06-04 14:49:54 +0000
commit30ea1a2693bb1ba4b119ac6257985b9e11e45b83 (patch)
tree6ef3551ed54771be991beeae7b9e8f43a09fd41c /compiler/rustc_infer/src
parentbc33782c23bc3e04eab7c85c43bbe1a108b11f80 (diff)
parenta5dc684eee684c23032f8f8beba1ff90322a61f8 (diff)
downloadrust-30ea1a2693bb1ba4b119ac6257985b9e11e45b83.tar.gz
rust-30ea1a2693bb1ba4b119ac6257985b9e11e45b83.zip
Auto merge of #125976 - compiler-errors:rollup-xt3le7w, r=compiler-errors
Rollup of 8 pull requests

Successful merges:

 - #125667 (Silence follow-up errors directly based on error types and regions)
 - #125717 (Refactor `#[diagnostic::do_not_recommend]` support)
 - #125795 (Improve renaming suggestion for names with leading underscores)
 - #125865 (Fix ICE caused by ignoring EffectVars in type inference)
 - #125953 (Streamline `nested` calls.)
 - #125959 (Reduce `pub` exposure in `rustc_mir_build`)
 - #125967 (Split smir `Const` into `TyConst` and `MirConst`)
 - #125968 (Store the types of `ty::Expr` arguments in the `ty::Expr`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_infer/src')
-rw-r--r--compiler/rustc_infer/src/infer/mod.rs2
-rw-r--r--compiler/rustc_infer/src/infer/resolve.rs3
2 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_infer/src/infer/mod.rs b/compiler/rustc_infer/src/infer/mod.rs
index f46c596425b..2cfa447833c 100644
--- a/compiler/rustc_infer/src/infer/mod.rs
+++ b/compiler/rustc_infer/src/infer/mod.rs
@@ -587,6 +587,7 @@ pub enum FixupError {
     UnresolvedFloatTy(FloatVid),
     UnresolvedTy(TyVid),
     UnresolvedConst(ConstVid),
+    UnresolvedEffect(EffectVid),
 }
 
 /// See the `region_obligations` field for more information.
@@ -614,6 +615,7 @@ impl fmt::Display for FixupError {
             ),
             UnresolvedTy(_) => write!(f, "unconstrained type"),
             UnresolvedConst(_) => write!(f, "unconstrained const value"),
+            UnresolvedEffect(_) => write!(f, "unconstrained effect value"),
         }
     }
 }
diff --git a/compiler/rustc_infer/src/infer/resolve.rs b/compiler/rustc_infer/src/infer/resolve.rs
index 21ef2e89523..830d79f52b9 100644
--- a/compiler/rustc_infer/src/infer/resolve.rs
+++ b/compiler/rustc_infer/src/infer/resolve.rs
@@ -167,6 +167,9 @@ impl<'a, 'tcx> FallibleTypeFolder<TyCtxt<'tcx>> for FullTypeResolver<'a, 'tcx> {
                 ty::ConstKind::Infer(InferConst::Fresh(_)) => {
                     bug!("Unexpected const in full const resolver: {:?}", c);
                 }
+                ty::ConstKind::Infer(InferConst::EffectVar(evid)) => {
+                    return Err(FixupError::UnresolvedEffect(evid));
+                }
                 _ => {}
             }
             c.try_super_fold_with(self)