Skip to content

Commit 7ff5375

Browse files
committed
Ignore mismatched_lifetime_syntaxes lint
warning: lifetime flowing from input to output with different syntax can be confusing --> src/buffer.rs:82:18 | 82 | pub fn begin(&self) -> Cursor { | ^^^^^ ------ 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 | 82 | pub fn begin(&self) -> Cursor<'_> { | ++++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/data.rs:71:17 | 71 | pub fn iter(&self) -> punctuated::Iter<Field> { | ^^^^^ ----------------------- 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 | 71 | pub fn iter(&self) -> punctuated::Iter<'_, Field> { | +++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/data.rs:82:21 | 82 | pub fn iter_mut(&mut self) -> punctuated::IterMut<Field> { | ^^^^^^^^^ -------------------------- 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 | 82 | pub fn iter_mut(&mut self) -> punctuated::IterMut<'_, Field> { | +++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/data.rs:141:24 | 141 | pub fn members(&self) -> impl Iterator<Item = Member> + Clone + '_ [Members] { | ^^^^^ this lifetime flows to the output ------- the lifetime gets resolved as `'_` | help: one option is to remove the lifetime for references and use the anonymous lifetime for paths | 141 | pub fn members(&self) -> impl Iterator<Item = Member> + Clone + '_ [Members<'_>] { | ++++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/generics.rs:108:26 | 108 | pub fn lifetimes(&self) -> impl Iterator<Item = &LifetimeParam> [Lifetimes] { | ^^^^^ this lifetime flows to the output --------- the lifetime gets resolved as `'_` | help: one option is to remove the lifetime for references and use the anonymous lifetime for paths | 108 | pub fn lifetimes(&self) -> impl Iterator<Item = &LifetimeParam> [Lifetimes<'_>] { | ++++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/generics.rs:115:30 | 115 | pub fn lifetimes_mut(&mut self) -> impl Iterator<Item = &mut LifetimeParam> [LifetimesMut] { | ^^^^^^^^^ this lifetime flows to the output ------------ the lifetime gets resolved as `'_` | help: one option is to remove the lifetime for references and use the anonymous lifetime for paths | 115 | pub fn lifetimes_mut(&mut self) -> impl Iterator<Item = &mut LifetimeParam> [LifetimesMut<'_>] { | ++++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/generics.rs:122:28 | 122 | pub fn type_params(&self) -> impl Iterator<Item = &TypeParam> [TypeParams] { | ^^^^^ this lifetime flows to the output ---------- the lifetime gets resolved as `'_` | help: one option is to remove the lifetime for references and use the anonymous lifetime for paths | 122 | pub fn type_params(&self) -> impl Iterator<Item = &TypeParam> [TypeParams<'_>] { | ++++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/generics.rs:129:32 | 129 | pub fn type_params_mut(&mut self) -> impl Iterator<Item = &mut TypeParam> [TypeParamsMut] { | ^^^^^^^^^ this lifetime flows to the output ------------- the lifetime gets resolved as `'_` | help: one option is to remove the lifetime for references and use the anonymous lifetime for paths | 129 | pub fn type_params_mut(&mut self) -> impl Iterator<Item = &mut TypeParam> [TypeParamsMut<'_>] { | ++++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/generics.rs:136:29 | 136 | pub fn const_params(&self) -> impl Iterator<Item = &ConstParam> [ConstParams] { | ^^^^^ this lifetime flows to the output ----------- the lifetime gets resolved as `'_` | help: one option is to remove the lifetime for references and use the anonymous lifetime for paths | 136 | pub fn const_params(&self) -> impl Iterator<Item = &ConstParam> [ConstParams<'_>] { | ++++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/generics.rs:143:33 | 143 | pub fn const_params_mut(&mut self) -> impl Iterator<Item = &mut ConstParam> [ConstParamsMut] { | ^^^^^^^^^ this lifetime flows to the output -------------- the lifetime gets resolved as `'_` | help: one option is to remove the lifetime for references and use the anonymous lifetime for paths | 143 | pub fn const_params_mut(&mut self) -> impl Iterator<Item = &mut ConstParam> [ConstParamsMut<'_>] { | ++++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/generics.rs:176:27 | 176 | pub fn split_for_impl(&self) -> (ImplGenerics, TypeGenerics, Option<&WhereClause>) { | ^^^^^ ------------ ------------ ------------ the lifetimes get resolved as `'_` | | | | | | | the lifetimes get resolved as `'_` | | the lifetimes get 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 | 176 | pub fn split_for_impl(&self) -> (ImplGenerics<'_>, TypeGenerics<'_>, Option<&WhereClause>) { | ++++ ++++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/parse.rs:1279:35 | 1279 | fn tokens_to_parse_buffer(tokens: &TokenBuffer) -> ParseBuffer { | ^^^^^^^^^^^^ ----------- 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 | 1279 | fn tokens_to_parse_buffer(tokens: &TokenBuffer) -> ParseBuffer<'_> { | ++++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/discouraged.rs:212:28 | 212 | fn parse_any_delimiter(&self) -> Result<(Delimiter, DelimSpan, ParseBuffer)> { | ^^^^^ this lifetime flows to the output ----------- the lifetime gets resolved as `'_` | help: one option is to remove the lifetime for references and use the anonymous lifetime for paths | 212 | fn parse_any_delimiter(&self) -> Result<(Delimiter, DelimSpan, ParseBuffer<'_>)> { | ++++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/punctuated.rs:119:17 | 119 | pub fn iter(&self) -> Iter<T> { | ^^^^^ ------- 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 | 119 | pub fn iter(&self) -> Iter<'_, T> { | +++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/punctuated.rs:130:21 | 130 | pub fn iter_mut(&mut self) -> IterMut<T> { | ^^^^^^^^^ ---------- 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 | 130 | pub fn iter_mut(&mut self) -> IterMut<'_, T> { | +++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/punctuated.rs:141:18 | 141 | pub fn pairs(&self) -> Pairs<T, P> { | ^^^^^ ----------- 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 | 141 | pub fn pairs(&self) -> Pairs<'_, T, P> { | +++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/punctuated.rs:150:22 | 150 | pub fn pairs_mut(&mut self) -> PairsMut<T, P> { | ^^^^^^^^^ -------------- 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 | 150 | pub fn pairs_mut(&mut self) -> PairsMut<'_, T, P> { | +++ warning: lifetime flowing from input to output with different syntax can be confusing --> tests/test_round_trip.rs:161:42 | 161 | fn librustc_parse(content: String, sess: &ParseSess) -> PResult<Crate> { | ^^^^^^^^^^ -------------- 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 | 161 | fn librustc_parse(content: String, sess: &ParseSess) -> PResult<'_, Crate> { | +++
1 parent c584364 commit 7ff5375

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@
308308
clippy::used_underscore_binding,
309309
clippy::wildcard_imports,
310310
)]
311+
#![allow(unknown_lints, mismatched_lifetime_syntaxes)]
311312

312313
extern crate self as syn;
313314

tests/test_round_trip.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
clippy::needless_lifetimes,
1212
clippy::uninlined_format_args
1313
)]
14+
#![allow(mismatched_lifetime_syntaxes)]
1415

1516
extern crate rustc_ast;
1617
extern crate rustc_ast_pretty;

0 commit comments

Comments
 (0)