diff options
| author | Rémy Rakic <remy.rakic+github@gmail.com> | 2023-11-06 15:46:17 +0000 |
|---|---|---|
| committer | Rémy Rakic <remy.rakic+github@gmail.com> | 2023-11-06 15:46:17 +0000 |
| commit | 2beca157c96329da93320de83bdb7192bf02fa96 (patch) | |
| tree | 2480b60518ab7d067a6681eb36a6fd0479410e35 | |
| parent | e1fcecb1b9930f109a8c1cf2b690e03483a41289 (diff) | |
| download | rust-2beca157c96329da93320de83bdb7192bf02fa96.tar.gz rust-2beca157c96329da93320de83bdb7192bf02fa96.zip | |
check binders with bound vars for global bounds that don't hold
(instead of just late bound vars)
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/wfcheck.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs index 046983e90f7..eb4491b89bf 100644 --- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs +++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs @@ -32,6 +32,7 @@ use rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt as _ use rustc_trait_selection::traits::{ self, ObligationCause, ObligationCauseCode, ObligationCtxt, WellFormedLoc, }; +use rustc_type_ir::TypeFlags; use std::cell::LazyCell; use std::ops::{ControlFlow, Deref}; @@ -1877,7 +1878,7 @@ impl<'tcx> WfCheckingCtxt<'_, 'tcx> { continue; } // Match the existing behavior. - if pred.is_global() && !pred.has_late_bound_vars() { + if pred.is_global() && !pred.has_type_flags(TypeFlags::HAS_BINDER_VARS) { let pred = self.normalize(span, None, pred); let hir_node = tcx.hir().find_by_def_id(self.body_def_id); |
