Skip to content

Commit 2130ba5

Browse files
committed
Ignore mismatched_lifetime_syntaxes lint
warning: lifetime flowing from input to output with different syntax can be confusing --> serde/src/private/de.rs:266:23 | 266 | fn unexpected(&self) -> Unexpected { | ^^^^^ ---------- the lifetime gets resolved as `'_` | | | this lifetime flows to the output | = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default help: one option is to remove the lifetime for references and use the anonymous lifetime for paths | 266 | fn unexpected(&self) -> Unexpected<'_> { | ++++ warning: lifetime flowing from input to output with different syntax can be confusing --> serde/src/private/mod.rs:27:35 | 27 | pub fn from_utf8_lossy(bytes: &[u8]) -> Cow<str> { | ^^^^^ -------- the lifetime gets resolved as `'_` | | | this lifetime flows to the output | help: one option is to remove the lifetime for references and use the anonymous lifetime for paths | 27 | pub fn from_utf8_lossy(bytes: &[u8]) -> Cow<'_, str> { | +++ warning: lifetime flowing from input to output with different syntax can be confusing --> serde_derive/src/internals/attr.rs:612:23 | 612 | pub fn serde_path(&self) -> Cow<syn::Path> { | ^^^^^ -------------- the lifetime gets resolved as `'_` | | | this lifetime flows to the output | = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default help: one option is to remove the lifetime for references and use the anonymous lifetime for paths | 612 | pub fn serde_path(&self) -> Cow<'_, syn::Path> { | +++ warning: lifetime flowing from input to output with different syntax can be confusing --> serde_derive/src/internals/case.rs:45:37 | 45 | pub fn from_str(rename_all_str: &str) -> Result<Self, ParseError> { | ^^^^ ---------- the lifetime gets resolved as `'_` | | | this lifetime flows to the output | help: one option is to remove the lifetime for references and use the anonymous lifetime for paths | 45 | pub fn from_str(rename_all_str: &str) -> Result<Self, ParseError<'_>> { | ++++ warning: lifetime flowing from input to output with different syntax can be confusing --> serde_derive/src/de.rs:3228:13 | 3228 | params: &Parameters, | ^^^^^^^^^^^ this lifetime flows to the output 3229 | ) -> ( 3230 | DeImplGenerics, | -------------- the lifetimes get resolved as `'_` 3231 | DeTypeGenerics, | -------------- the lifetimes get resolved as `'_` 3232 | syn::TypeGenerics, | ----------------- the lifetimes get resolved as `'_` 3233 | Option<&syn::WhereClause>, | ----------------- the lifetimes get resolved as `'_` | help: one option is to remove the lifetime for references and use the anonymous lifetime for paths | 3230 ~ DeImplGenerics<'_>, 3231 ~ DeTypeGenerics<'_>, 3232 ~ syn::TypeGenerics<'_>, |
1 parent a1ddb18 commit 2130ba5

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

serde/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
//
107107
// https://github.com/serde-rs/serde/issues/812
108108
#![cfg_attr(feature = "unstable", feature(never_type))]
109-
#![allow(unknown_lints, bare_trait_objects, deprecated)]
109+
#![allow(unknown_lints, bare_trait_objects, deprecated, mismatched_lifetime_syntaxes)]
110110
// Ignored clippy and clippy_pedantic lints
111111
#![allow(
112112
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/5704

serde_derive/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
clippy::wildcard_imports
6565
)]
6666
#![cfg_attr(all(test, exhaustive), feature(non_exhaustive_omitted_patterns_lint))]
67+
#![allow(unknown_lints, mismatched_lifetime_syntaxes)]
6768

6869
extern crate proc_macro2;
6970
extern crate quote;

serde_derive_internals/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
clippy::unused_self,
4242
clippy::wildcard_imports
4343
)]
44+
#![allow(unknown_lints, mismatched_lifetime_syntaxes)]
4445

4546
extern crate proc_macro2;
4647
extern crate quote;

0 commit comments

Comments
 (0)