Skip to content

Commit afd892a

Browse files
committed
update TypeFlags to deal with missing ct substs
1 parent b1786f6 commit afd892a

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
@@ -117,7 +117,7 @@ impl<'tcx> LateLintPass<'tcx> for NeedlessPassByValue {
117117
let fn_def_id = cx.tcx.hir().local_def_id(hir_id);
118118

119119
let preds = traits::elaborate_predicates(cx.tcx, cx.param_env.caller_bounds().iter())
120-
.filter(|p| !p.is_global())
120+
.filter(|p| !p.is_global(cx.tcx))
121121
.filter_map(|obligation| {
122122
// Note that we do not want to deal with qualified predicates here.
123123
match obligation.predicate.kind().no_bound_vars() {

clippy_utils/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1581,7 +1581,7 @@ pub fn fn_has_unsatisfiable_preds(cx: &LateContext<'_>, did: DefId) -> bool {
15811581
.predicates_of(did)
15821582
.predicates
15831583
.iter()
1584-
.filter_map(|(p, _)| if p.is_global() { Some(*p) } else { None });
1584+
.filter_map(|(p, _)| if p.is_global(cx.tcx) { Some(*p) } else { None });
15851585
traits::impossible_predicates(
15861586
cx.tcx,
15871587
traits::elaborate_predicates(cx.tcx, predicates)

0 commit comments

Comments
 (0)