Skip to content

Commit d048c11

Browse files
committed
Auto merge of rust-lang#110031 - compiler-errors:generic-elaboration, r=b-naber
Make elaboration generic over input Combines all the `elaborate_*` family of functions into just one, which is an iterator over the same type that you pass in (e.g. elaborating `Predicate` gives `Predicate`s, elaborating `Obligation`s gives `Obligation`s, etc.)
2 parents 293c1a1 + 0963a66 commit d048c11

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clippy_lints/src/needless_pass_by_value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl<'tcx> LateLintPass<'tcx> for NeedlessPassByValue {
122122

123123
let sized_trait = need!(cx.tcx.lang_items().sized_trait());
124124

125-
let preds = traits::elaborate_predicates(cx.tcx, cx.param_env.caller_bounds().iter())
125+
let preds = traits::elaborate(cx.tcx, cx.param_env.caller_bounds().iter())
126126
.filter(|p| !p.is_global())
127127
.filter_map(|pred| {
128128
// Note that we do not want to deal with qualified predicates here.

clippy_utils/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2104,7 +2104,7 @@ pub fn fn_has_unsatisfiable_preds(cx: &LateContext<'_>, did: DefId) -> bool {
21042104
.filter_map(|(p, _)| if p.is_global() { Some(*p) } else { None });
21052105
traits::impossible_predicates(
21062106
cx.tcx,
2107-
traits::elaborate_predicates(cx.tcx, predicates)
2107+
traits::elaborate(cx.tcx, predicates)
21082108
.collect::<Vec<_>>(),
21092109
)
21102110
}

0 commit comments

Comments
 (0)