Skip to content

Commit

Permalink
Fix fallout from rust-lang/rust#68140
Browse files Browse the repository at this point in the history
  • Loading branch information
ecstatic-morse committed Jan 21, 2020
1 parent f78cc07 commit 1a4a59c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/needless_pass_by_value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
let preds = traits::elaborate_predicates(cx.tcx, cx.param_env.caller_bounds.to_vec())
.filter(|p| !p.is_global())
.filter_map(|pred| {
if let ty::Predicate::Trait(poly_trait_ref) = pred {
if let ty::Predicate::Trait(poly_trait_ref, _) = pred {
if poly_trait_ref.def_id() == sized_trait || poly_trait_ref.skip_binder().has_escaping_bound_vars()
{
return None;
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1300,7 +1300,7 @@ pub fn is_must_use_ty<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: Ty<'tcx>) -> boo
Tuple(ref substs) => substs.types().any(|ty| is_must_use_ty(cx, ty)),
Opaque(ref def_id, _) => {
for (predicate, _) in cx.tcx.predicates_of(*def_id).predicates {
if let ty::Predicate::Trait(ref poly_trait_predicate) = predicate {
if let ty::Predicate::Trait(ref poly_trait_predicate, _) = predicate {
if must_use_attr(&cx.tcx.get_attrs(poly_trait_predicate.skip_binder().trait_ref.def_id)).is_some() {
return true;
}
Expand Down

0 comments on commit 1a4a59c

Please sign in to comment.