mirror of
https://github.com/serde-rs/serde.git
synced 2025-09-27 04:50:36 +00:00

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<'_>, |
55 lines
1.8 KiB
Rust
55 lines
1.8 KiB
Rust
#![doc(html_root_url = "https://docs.rs/serde_derive_internals/0.29.1")]
|
|
#![cfg_attr(not(check_cfg), allow(unexpected_cfgs))]
|
|
// Ignored clippy lints
|
|
#![allow(
|
|
clippy::cognitive_complexity,
|
|
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/7575
|
|
clippy::collapsible_match,
|
|
clippy::derive_partial_eq_without_eq,
|
|
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/6797
|
|
clippy::manual_map,
|
|
clippy::missing_panics_doc,
|
|
clippy::needless_lifetimes,
|
|
clippy::redundant_field_names,
|
|
clippy::result_unit_err,
|
|
clippy::should_implement_trait,
|
|
clippy::trivially_copy_pass_by_ref,
|
|
clippy::wildcard_in_or_patterns,
|
|
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/5704
|
|
clippy::unnested_or_patterns,
|
|
)]
|
|
// Ignored clippy_pedantic lints
|
|
#![allow(
|
|
clippy::doc_markdown,
|
|
clippy::elidable_lifetime_names,
|
|
clippy::enum_glob_use,
|
|
clippy::items_after_statements,
|
|
clippy::let_underscore_untyped,
|
|
clippy::manual_assert,
|
|
clippy::match_same_arms,
|
|
// clippy bug: https://github.com/rust-lang/rust-clippy/issues/6984
|
|
clippy::match_wildcard_for_single_variants,
|
|
clippy::missing_errors_doc,
|
|
clippy::module_name_repetitions,
|
|
clippy::must_use_candidate,
|
|
clippy::return_self_not_must_use,
|
|
clippy::similar_names,
|
|
clippy::single_match_else,
|
|
clippy::struct_excessive_bools,
|
|
clippy::too_many_lines,
|
|
clippy::uninlined_format_args,
|
|
clippy::unused_self,
|
|
clippy::wildcard_imports
|
|
)]
|
|
#![allow(unknown_lints, mismatched_lifetime_syntaxes)]
|
|
|
|
extern crate proc_macro2;
|
|
extern crate quote;
|
|
extern crate syn;
|
|
|
|
#[cfg_attr(serde_build_from_git, path = "../serde_derive/src/internals/mod.rs")]
|
|
#[cfg_attr(not(serde_build_from_git), path = "src/mod.rs")]
|
|
mod internals;
|
|
|
|
pub use internals::*;
|