mirror of
https://github.com/dtolnay/thiserror.git
synced 2025-04-01 20:07:38 +03:00
Ignore elidable_lifetime_names pedantic clippy lint
warning: the following explicit lifetimes could be elided: 'a --> src/var.rs:5:6 | 5 | impl<'a, T: Pointer + ?Sized> Pointer for Var<'a, T> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names = note: `-W clippy::elidable-lifetime-names` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::elidable_lifetime_names)]` help: elide the lifetimes | 5 - impl<'a, T: Pointer + ?Sized> Pointer for Var<'a, T> { 5 + impl<T: Pointer + ?Sized> Pointer for Var<'_, T> { | warning: the following explicit lifetimes could be elided: 'a --> tests/test_lints.rs:40:22 | 40 | pub enum MyError<'a> { | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names = note: `-W clippy::elidable-lifetime-names` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::elidable_lifetime_names)]` help: elide the lifetimes | 40 - pub enum MyError<'a> { 40 + pub enum MyError'_> { | warning: the following explicit lifetimes could be elided: 'a --> tests/test_display.rs:157:14 | 157 | impl<'a> Display for Msg<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#elidable_lifetime_names = note: `-W clippy::elidable-lifetime-names` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::elidable_lifetime_names)]` help: elide the lifetimes | 157 - impl<'a> Display for Msg<'a> { 157 + impl Display for Msg<'_> { |
This commit is contained in:
parent
daf2a6f36e
commit
9f27b766f5
4 changed files with 15 additions and 3 deletions
|
@ -181,7 +181,12 @@ fn impl_struct(input: Struct) -> TokenStream {
|
|||
}
|
||||
};
|
||||
Some(quote! {
|
||||
#[allow(deprecated, unused_qualifications, clippy::needless_lifetimes)]
|
||||
#[allow(
|
||||
deprecated,
|
||||
unused_qualifications,
|
||||
clippy::elidable_lifetime_names,
|
||||
clippy::needless_lifetimes,
|
||||
)]
|
||||
#from_impl
|
||||
})
|
||||
});
|
||||
|
@ -451,7 +456,12 @@ fn impl_enum(input: Enum) -> TokenStream {
|
|||
}
|
||||
};
|
||||
Some(quote! {
|
||||
#[allow(deprecated, unused_qualifications, clippy::needless_lifetimes)]
|
||||
#[allow(
|
||||
deprecated,
|
||||
unused_qualifications,
|
||||
clippy::elidable_lifetime_names,
|
||||
clippy::needless_lifetimes,
|
||||
)]
|
||||
#from_impl
|
||||
})
|
||||
});
|
||||
|
|
|
@ -259,6 +259,7 @@
|
|||
#![no_std]
|
||||
#![doc(html_root_url = "https://docs.rs/thiserror/2.0.11")]
|
||||
#![allow(
|
||||
clippy::elidable_lifetime_names,
|
||||
clippy::module_name_repetitions,
|
||||
clippy::needless_lifetimes,
|
||||
clippy::return_self_not_must_use,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#![allow(
|
||||
clippy::elidable_lifetime_names,
|
||||
clippy::needless_lifetimes,
|
||||
clippy::needless_raw_string_hashes,
|
||||
clippy::trivially_copy_pass_by_ref,
|
||||
|
|
|
@ -33,7 +33,7 @@ fn test_unused_qualifications() {
|
|||
#[test]
|
||||
fn test_needless_lifetimes() {
|
||||
#![allow(dead_code)]
|
||||
#![deny(clippy::needless_lifetimes)]
|
||||
#![deny(clippy::elidable_lifetime_names, clippy::needless_lifetimes)]
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
#[error("...")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue