We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dccc8db commit 0b81f99Copy full SHA for 0b81f99
compiler/rustc_trait_selection/src/solve/eval_ctxt/canonical.rs
@@ -137,7 +137,9 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
137
138
#[instrument(level = "debug", skip(self), ret)]
139
fn compute_external_query_constraints(&self) -> Result<ExternalConstraints<'tcx>, NoSolution> {
140
- self.infcx.leak_check(ty::UniverseIndex::ROOT, None).map_err(|e| {
+ // 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| {
143
debug!(?e, "failed the leak check");
144
NoSolution
145
})?;
0 commit comments