Make elaborator generic

This commit is contained in:
Michael Goulet 2023-04-06 23:11:19 +00:00
parent e9c7fb10b9
commit 0963a66ab3
2 changed files with 2 additions and 2 deletions

View File

@ -122,7 +122,7 @@ impl<'tcx> LateLintPass<'tcx> for NeedlessPassByValue {
let sized_trait = need!(cx.tcx.lang_items().sized_trait());
let preds = traits::elaborate_predicates(cx.tcx, cx.param_env.caller_bounds().iter())
let preds = traits::elaborate(cx.tcx, cx.param_env.caller_bounds().iter())
.filter(|p| !p.is_global())
.filter_map(|pred| {
// Note that we do not want to deal with qualified predicates here.

View File

@ -2104,7 +2104,7 @@ pub fn fn_has_unsatisfiable_preds(cx: &LateContext<'_>, did: DefId) -> bool {
.filter_map(|(p, _)| if p.is_global() { Some(*p) } else { None });
traits::impossible_predicates(
cx.tcx,
traits::elaborate_predicates(cx.tcx, predicates)
traits::elaborate(cx.tcx, predicates)
.collect::<Vec<_>>(),
)
}