-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix needless_lifetimes in rustc_serialize #131403
Conversation
rustbot has assigned @petrochenkov. Use |
@bors r+ rollup |
…2, r=petrochenkov Fix needless_lifetimes in rustc_serialize Hi, This PR fixes the following clipy warnings: ``` warning: the following explicit lifetimes could be elided: 'a --> compiler/rustc_serialize/src/serialize.rs:328:6 | 328 | impl<'a, S: Encoder, T: Encodable<S>> Encodable<S> for Cow<'a, [T]> | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 328 - impl<'a, S: Encoder, T: Encodable<S>> Encodable<S> for Cow<'a, [T]> 328 + impl<S: Encoder, T: Encodable<S>> Encodable<S> for Cow<'_, [T]> | warning: the following explicit lifetimes could be elided: 'a --> compiler/rustc_serialize/src/serialize.rs:348:6 | 348 | impl<'a, S: Encoder> Encodable<S> for Cow<'a, str> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 348 - impl<'a, S: Encoder> Encodable<S> for Cow<'a, str> { 348 + impl<S: Encoder> Encodable<S> for Cow<'_, str> { | warning: the following explicit lifetimes could be elided: 'a --> compiler/rustc_serialize/src/serialize.rs:355:6 | 355 | impl<'a, D: Decoder> Decodable<D> for Cow<'a, str> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 355 - impl<'a, D: Decoder> Decodable<D> for Cow<'a, str> { 355 + impl<D: Decoder> Decodable<D> for Cow<'_, str> { ``` Best regards, Michal
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
I have looked at this test and I'm not sure what is the purpose of it. |
Ok, I think it may be fixed after merging this #131444 |
@bors retry |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#123951 (Reserve guarded string literals (RFC 3593)) - rust-lang#130827 (Library: Rename "object safe" to "dyn compatible") - rust-lang#131383 (Add docs about slicing slices at the ends) - rust-lang#131403 (Fix needless_lifetimes in rustc_serialize) - rust-lang#131417 (Fix methods alignment on mobile) - rust-lang#131449 (Decouple WASIp2 sockets from WasiFd) - rust-lang#131462 (Mention allocation errors for `open_buffered`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#131403 - practicalrs:fix_needless_lifetimes_p2, r=petrochenkov Fix needless_lifetimes in rustc_serialize Hi, This PR fixes the following clipy warnings: ``` warning: the following explicit lifetimes could be elided: 'a --> compiler/rustc_serialize/src/serialize.rs:328:6 | 328 | impl<'a, S: Encoder, T: Encodable<S>> Encodable<S> for Cow<'a, [T]> | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 328 - impl<'a, S: Encoder, T: Encodable<S>> Encodable<S> for Cow<'a, [T]> 328 + impl<S: Encoder, T: Encodable<S>> Encodable<S> for Cow<'_, [T]> | warning: the following explicit lifetimes could be elided: 'a --> compiler/rustc_serialize/src/serialize.rs:348:6 | 348 | impl<'a, S: Encoder> Encodable<S> for Cow<'a, str> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 348 - impl<'a, S: Encoder> Encodable<S> for Cow<'a, str> { 348 + impl<S: Encoder> Encodable<S> for Cow<'_, str> { | warning: the following explicit lifetimes could be elided: 'a --> compiler/rustc_serialize/src/serialize.rs:355:6 | 355 | impl<'a, D: Decoder> Decodable<D> for Cow<'a, str> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 355 - impl<'a, D: Decoder> Decodable<D> for Cow<'a, str> { 355 + impl<D: Decoder> Decodable<D> for Cow<'_, str> { ``` Best regards, Michal
Hi,
This PR fixes the following clipy warnings:
Best regards,
Michal