about summary refs log tree commit diff
path: root/compiler/rustc_lint/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-11-17 22:33:19 +0100
committerGitHub <noreply@github.com>2022-11-17 22:33:19 +0100
commited97f245f1a15f0ba22a622fb693ac8bdbdbed0c (patch)
treea9a34f97b542b69da55fd6243c21fd3e18f1a08f /compiler/rustc_lint/src
parent1c52c247f98fd66b11be0179b1e3f80f05b5ddfe (diff)
parent4f11f3b2571c895c08757aa91af57fc1091e45ef (diff)
downloadrust-ed97f245f1a15f0ba22a622fb693ac8bdbdbed0c.tar.gz
rust-ed97f245f1a15f0ba22a622fb693ac8bdbdbed0c.zip
Rollup merge of #104483 - oli-obk:santa-clauses-make-goals, r=compiler-errors
Convert predicates into Predicate in the Obligation constructor

instead of having almost all callers do that.

This reduces a bit of boilerplate, and also paves the way for my work towards https://github.com/rust-lang/compiler-team/issues/531 (as it makes it easier to accept both goals and clauses where right now it only accepts predicates).
Diffstat (limited to 'compiler/rustc_lint/src')
-rw-r--r--compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs b/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs
index 619582c0539..7e0a8a0df16 100644
--- a/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs
+++ b/compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs
@@ -108,6 +108,7 @@ impl<'tcx> LateLintPass<'tcx> for OpaqueHiddenInferredBound {
                 // then we must've taken advantage of the hack in `project_and_unify_types` where
                 // we replace opaques with inference vars. Emit a warning!
                 if !infcx.predicate_must_hold_modulo_regions(&traits::Obligation::new(
+                    cx.tcx,
                     traits::ObligationCause::dummy(),
                     cx.param_env,
                     assoc_pred,