Skip to content

Commit 07d2bca

Browse files
committed
Ignore mismatched_lifetime_syntaxes lint
warning: lifetime flowing from input to output with different syntax can be confusing --> macro/src/generics.rs:70:43 | 70 | pub(crate) fn to_underscore_lifetimes(&self) -> UnderscoreLifetimes { | ^^^^^ ------------------- 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 | 70 | pub(crate) fn to_underscore_lifetimes(&self) -> UnderscoreLifetimes<'_> { | ++++ warning: lifetime flowing from input to output with different syntax can be confusing --> syntax/instantiate.rs:30:28 | 30 | pub(crate) fn impl_key(&self) -> Option<ImplKey> { | ^^^^^ ------- 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 | 30 | pub(crate) fn impl_key(&self) -> Option<ImplKey<'_>> { | ++++ warning: lifetime flowing from input to output with different syntax can be confusing --> syntax/map.rs:29:28 | 29 | pub(crate) fn iter(&self) -> Iter<K, V> { | ^^^^^ ---------- 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 | 29 | pub(crate) fn iter(&self) -> Iter<'_, K, V> { | +++ warning: lifetime flowing from input to output with different syntax can be confusing --> syntax/map.rs:115:29 | 115 | pub(crate) fn entry(&mut self, key: K) -> Entry<K, V> { | ^^^^^^^^^ ----------- 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 | 115 | pub(crate) fn entry(&mut self, key: K) -> Entry<'_, K, V> { | +++ warning: lifetime flowing from input to output with different syntax can be confusing --> syntax/namespace.rs:22:24 | 22 | pub(crate) fn iter(&self) -> Iter<Ident> { | ^^^^^ ----------- 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 | 22 | pub(crate) fn iter(&self) -> Iter<'_, Ident> { | +++ warning: lifetime flowing from input to output with different syntax can be confusing --> macro/src/tokens.rs:11:22 | 11 | pub(crate) fn ty(&self) -> ReceiverType { | ^^^^^ ------------ 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 | 11 | pub(crate) fn ty(&self) -> ReceiverType<'_> { | ++++ warning: lifetime flowing from input to output with different syntax can be confusing --> macro/src/tokens.rs:16:27 | 16 | pub(crate) fn ty_self(&self) -> ReceiverTypeSelf { | ^^^^^ ---------------- 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 | 16 | pub(crate) fn ty_self(&self) -> ReceiverTypeSelf<'_> { | ++++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/cxx_vector.rs:166:17 | 166 | pub fn iter(&self) -> Iter<T> { | ^^^^^ ------- 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 | 166 | pub fn iter(&self) -> Iter<'_, T> { | +++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/cxx_vector.rs:171:31 | 171 | pub fn iter_mut(self: Pin<&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 | 171 | pub fn iter_mut(self: Pin<&mut Self>) -> IterMut<'_, T> { | +++ warning: lifetime flowing from input to output with different syntax can be confusing --> src/cxx_string.rs:169:28 | 169 | pub fn to_string_lossy(&self) -> 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 | 169 | pub fn to_string_lossy(&self) -> Cow<'_, str> { | +++
1 parent 00fb850 commit 07d2bca

File tree

8 files changed

+26
-2
lines changed

8 files changed

+26
-2
lines changed

gen/build/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
clippy::uninlined_format_args,
7676
clippy::upper_case_acronyms
7777
)]
78+
#![allow(unknown_lints, mismatched_lifetime_syntaxes)]
7879

7980
mod cargo;
8081
mod cfg;

gen/cmd/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
clippy::toplevel_ref_arg,
2424
clippy::uninlined_format_args
2525
)]
26+
#![allow(unknown_lints, mismatched_lifetime_syntaxes)]
2627

2728
mod app;
2829
mod cfg;

gen/lib/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
clippy::toplevel_ref_arg,
3737
clippy::uninlined_format_args
3838
)]
39+
#![allow(unknown_lints, mismatched_lifetime_syntaxes)]
3940

4041
mod error;
4142
mod gen;

macro/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
clippy::toplevel_ref_arg,
2020
clippy::uninlined_format_args
2121
)]
22+
#![allow(unknown_lints, mismatched_lifetime_syntaxes)]
2223

2324
mod derive;
2425
mod expand;

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@
395395
clippy::ref_as_ptr,
396396
clippy::uninlined_format_args
397397
)]
398+
#![allow(unknown_lints, mismatched_lifetime_syntaxes)]
398399

399400
#[cfg(built_with_cargo)]
400401
extern crate link_cplusplus;

tests/ffi/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ pub mod ffi {
239239
fn c_return_borrow<'a>(s: &'a CxxString) -> UniquePtr<Borrow<'a>>;
240240

241241
#[rust_name = "c_return_borrow_elided"]
242+
#[allow(unknown_lints, mismatched_lifetime_syntaxes)]
242243
fn c_return_borrow(s: &CxxString) -> UniquePtr<Borrow>;
243244

244245
fn const_member(self: &Borrow);

tests/ui/deny_elided_lifetimes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![deny(elided_lifetimes_in_paths)]
1+
#![deny(elided_lifetimes_in_paths, mismatched_lifetime_syntaxes)]
22

33
#[cxx::bridge]
44
mod ffi {

tests/ui/deny_elided_lifetimes.stderr

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,27 @@ error: hidden lifetime parameters in types are deprecated
77
note: the lint level is defined here
88
--> tests/ui/deny_elided_lifetimes.rs:1:9
99
|
10-
1 | #![deny(elided_lifetimes_in_paths)]
10+
1 | #![deny(elided_lifetimes_in_paths, mismatched_lifetime_syntaxes)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^
1212
help: indicate the anonymous lifetime
1313
|
1414
21 | fn lifetime_elided(s: &i32) -> UniquePtr<Cpp<'_>>;
1515
| ++++
16+
17+
error: lifetime flowing from input to output with different syntax can be confusing
18+
--> tests/ui/deny_elided_lifetimes.rs:21:31
19+
|
20+
21 | fn lifetime_elided(s: &i32) -> UniquePtr<Cpp>;
21+
| ^^^^ --- the lifetime gets resolved as `'_`
22+
| |
23+
| this lifetime flows to the output
24+
|
25+
note: the lint level is defined here
26+
--> tests/ui/deny_elided_lifetimes.rs:1:36
27+
|
28+
1 | #![deny(elided_lifetimes_in_paths, mismatched_lifetime_syntaxes)]
29+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30+
help: one option is to remove the lifetime for references and use the anonymous lifetime for paths
31+
|
32+
21 | fn lifetime_elided(s: &i32) -> UniquePtr<Cpp<'_>>;
33+
| ++++

0 commit comments

Comments
 (0)