Commit 50f7e80
authored
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,
Michal1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
| 348 | + | |
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
| 355 | + | |
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| |||
0 commit comments