Skip to content

Commit 0b81f99

Browse files
committed
update universe used by the leak check
1 parent dccc8db commit 0b81f99

File tree

1 file changed

+3
-1
lines changed
  • compiler/rustc_trait_selection/src/solve/eval_ctxt

1 file changed

+3
-1
lines changed

compiler/rustc_trait_selection/src/solve/eval_ctxt/canonical.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
137137

138138
#[instrument(level = "debug", skip(self), ret)]
139139
fn compute_external_query_constraints(&self) -> Result<ExternalConstraints<'tcx>, NoSolution> {
140-
self.infcx.leak_check(ty::UniverseIndex::ROOT, None).map_err(|e| {
140+
// We only check for leaks from universes which were entered inside
141+
// of the query.
142+
self.infcx.leak_check(self.max_input_universe, None).map_err(|e| {
141143
debug!(?e, "failed the leak check");
142144
NoSolution
143145
})?;

0 commit comments

Comments
 (0)