Skip to content

Commit

Permalink
Run fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Oct 6, 2020
1 parent adb7fc6 commit b05aeaa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
9 changes: 2 additions & 7 deletions clippy_lints/src/future_not_send.rs
Expand Up @@ -92,13 +92,8 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend {
|db| {
cx.tcx.infer_ctxt().enter(|infcx| {
for FulfillmentError { obligation, .. } in send_errors {
infcx.maybe_note_obligation_cause_for_async_await(
db,
&obligation,
);
if let Trait(trait_pred, _) =
obligation.predicate.skip_binders()
{
infcx.maybe_note_obligation_cause_for_async_await(db, &obligation);
if let Trait(trait_pred, _) = obligation.predicate.skip_binders() {
db.note(&format!(
"`{}` doesn't implement `{}`",
trait_pred.self_ty(),
Expand Down
4 changes: 1 addition & 3 deletions clippy_lints/src/methods/mod.rs
Expand Up @@ -1668,9 +1668,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
if let ty::Opaque(def_id, _) = *ret_ty.kind() {
// one of the associated types must be Self
for &(predicate, _span) in cx.tcx.explicit_item_bounds(def_id) {
if let ty::PredicateAtom::Projection(projection_predicate) =
predicate.skip_binders()
{
if let ty::PredicateAtom::Projection(projection_predicate) = predicate.skip_binders() {
// walk the associated type and check for Self
if contains_ty(projection_predicate.ty, self_ty) {
return;
Expand Down
3 changes: 1 addition & 2 deletions clippy_lints/src/utils/mod.rs
Expand Up @@ -1287,8 +1287,7 @@ pub fn is_must_use_ty<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>) -> bool {
ty::Opaque(ref def_id, _) => {
for (predicate, _) in cx.tcx.explicit_item_bounds(*def_id) {
if let ty::PredicateAtom::Trait(trait_predicate, _) = predicate.skip_binders() {
if must_use_attr(&cx.tcx.get_attrs(trait_predicate.trait_ref.def_id)).is_some()
{
if must_use_attr(&cx.tcx.get_attrs(trait_predicate.trait_ref.def_id)).is_some() {
return true;
}
}
Expand Down

0 comments on commit b05aeaa

Please sign in to comment.