]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #104483 - oli-obk:santa-clauses-make-goals, r=compiler-errors
authorMatthias Krüger <matthias.krueger@famsik.de>
Thu, 17 Nov 2022 21:33:19 +0000 (22:33 +0100)
committerGitHub <noreply@github.com>
Thu, 17 Nov 2022 21:33:19 +0000 (22:33 +0100)
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).

12 files changed:
1  2 
compiler/rustc_const_eval/src/transform/check_consts/qualifs.rs
compiler/rustc_hir_analysis/src/check/compare_method.rs
compiler/rustc_hir_analysis/src/check/wfcheck.rs
compiler/rustc_hir_typeck/src/callee.rs
compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs
compiler/rustc_hir_typeck/src/method/mod.rs
compiler/rustc_hir_typeck/src/method/probe.rs
compiler/rustc_hir_typeck/src/method/suggest.rs
compiler/rustc_lint/src/opaque_hidden_inferred_bound.rs
compiler/rustc_trait_selection/src/traits/error_reporting/mod.rs
compiler/rustc_trait_selection/src/traits/fulfill.rs
compiler/rustc_trait_selection/src/traits/select/mod.rs

index 46a760851893dd5cbe8697b1fb8b2b81717a4027,4419a3c04db6f9796d47151f7486c2098130b326..9d75ccad133dd6b20e37daca7fe138d8baf21613
@@@ -17,9 -17,9 +17,10 @@@ use rustc_infer::infer::{self, InferOk
  use rustc_middle::infer::unify_key::{ConstVariableOrigin, ConstVariableOriginKind};
  use rustc_middle::middle::stability;
  use rustc_middle::ty::fast_reject::{simplify_type, TreatParams};
 +use rustc_middle::ty::AssocItem;
  use rustc_middle::ty::GenericParamDefKind;
- use rustc_middle::ty::{self, ParamEnvAnd, ToPredicate, Ty, TyCtxt, TypeFoldable, TypeVisitable};
+ use rustc_middle::ty::ToPredicate;
+ use rustc_middle::ty::{self, ParamEnvAnd, Ty, TyCtxt, TypeFoldable, TypeVisitable};
  use rustc_middle::ty::{InternalSubsts, SubstsRef};
  use rustc_session::lint;
  use rustc_span::def_id::DefId;