Skip to content

Commit 0b5a7a6

Browse files
committed
Auto merge of #109652 - matthiaskrgr:rollup-pbw3hi3, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - #97506 (Stabilize `nonnull_slice_from_raw_parts`) - #98651 (Follow C-RW-VALUE in std::io::Cursor example) - #102742 (Remove unnecessary raw pointer in __rust_start_panic arg) - #109587 (Use an IndexVec to debug fingerprints.) - #109613 (fix type suggestions in match arms) - #109633 (Fix "Directly go to item in search if there is only one result" setting) - #109635 (debuginfo: Get pointer size/align from tcx.data_layout instead of layout_of) - #109641 (Don't elaborate non-obligations into obligations) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 0286274 + 0817ea4 commit 0b5a7a6

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

clippy_lints/src/needless_pass_by_value.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ impl<'tcx> LateLintPass<'tcx> for NeedlessPassByValue {
124124

125125
let preds = traits::elaborate_predicates(cx.tcx, cx.param_env.caller_bounds().iter())
126126
.filter(|p| !p.is_global())
127-
.filter_map(|obligation| {
127+
.filter_map(|pred| {
128128
// Note that we do not want to deal with qualified predicates here.
129-
match obligation.predicate.kind().no_bound_vars() {
129+
match pred.kind().no_bound_vars() {
130130
Some(ty::PredicateKind::Clause(ty::Clause::Trait(pred))) if pred.def_id() != sized_trait => {
131131
Some(pred)
132132
},

clippy_utils/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2106,7 +2106,6 @@ pub fn fn_has_unsatisfiable_preds(cx: &LateContext<'_>, did: DefId) -> bool {
21062106
traits::impossible_predicates(
21072107
cx.tcx,
21082108
traits::elaborate_predicates(cx.tcx, predicates)
2109-
.map(|o| o.predicate)
21102109
.collect::<Vec<_>>(),
21112110
)
21122111
}

0 commit comments

Comments
 (0)