]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #9132 - hellow554:maybe_trait_bound_on_type_repetition, r=Manishearth
authorbors <bors@rust-lang.org>
Thu, 7 Jul 2022 15:29:43 +0000 (15:29 +0000)
committerbors <bors@rust-lang.org>
Thu, 7 Jul 2022 15:29:43 +0000 (15:29 +0000)
Maybe trait bound on type repetition

*Please write a short comment explaining your change (or "none" for internal only changes)*

changelog: fix maybe trait on [`type_repetition_in_bounds`] lint

I simplified the two for loops, which did exactly the same. Only downside is, that I need a `copied`, but that's to convert from `&&` to `&`, to that should be a noop?

One more thing: I only handle [`TraitBoundModifier::Maybe`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/enum.TraitBoundModifier.html#variant.Maybe). Can anyone give me an example (and testcase) for [`TraitBoundModifier::MaybeConst`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/enum.TraitBoundModifier.html#variant.MaybeConst)?

closes #8770


Trivial merge