Description
I came across this example
warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration)
--> src/librustc/ty/query/plumbing.rs:1156:19
|
817 | / macro_rules! define_queries {
818 | | (<$tcx:tt> $($category:tt {
819 | | $($(#[$attr:meta])* [$($modifiers:tt)*] fn $name:ident: $node:ident($K:ty) -> $V:ty,)*
820 | | },)*) => {
821 | / define_queries_inner! { <$tcx>
822 | $($( $(#[$attr])* category<$category> [$($modifiers)*] fn $name: $node($K) -> $V,)*)*
823 | | }
| |________________- in this macro invocation (#3)
824 | | }
825 | | }
| |________- in this expansion of `define_queries!` (#2)
826 |
827 | / macro_rules! define_queries_inner {
828 | | (<$tcx:tt>
829 | | $($(#[$attr:meta])* category<$category:tt>
830 | | [$($modifiers:tt)*] fn $name:ident: $node:ident($K:ty) -> $V:ty,)*) => {
... |
1118 | / define_provider_struct! {
1119 | tcx: $tcx,
1120 | input: ($(([$($modifiers)*] [$name] [$K] [$V]))*)
1121 | | }
| |________________- in this macro invocation (#4)
...
1127 | | }
1128 | | }
| |________- in this expansion of `define_queries_inner!` (#3)
...
1147 | / macro_rules! define_provider_struct {
1148 | | (tcx: $tcx:tt,
1149 | | input: ($(([$($modifiers:tt)*] [$name:ident] [$K:ty] [$R:ty]))*)) => {
1150 | | pub struct Providers<$tcx> {
... |
1156 | $(fn $name<$tcx>(_: TyCtxt<$tcx>, key: $K) -> $R {
| __________________________^
1157 | bug!("`tcx.{}({:?})` unsupported by its crate",
1158 | stringify!($name), key);
1159 | | })*
| |________________________^
...
1163 | | };
1164 | | }
| |________- in this expansion of `define_provider_struct!` (#4)
|
::: src/librustc/ty/query/mod.rs:107:1
|
107 | / rustc_query_append! { [define_queries!][ <'tcx>
108 | | Other {
109 | | /// Runs analysis passes on the crate.
110 | | [eval_always] fn analysis: Analysis(CrateNum) -> Result<(), ErrorReported>,
111 | | },
112 | | ]}
| |_________- in this macro invocation (#1)
|
::: src/librustc/query/mod.rs:38:1
|
38 | / rustc_queries! {
39 | | Other {
40 | | query trigger_delay_span_bug(key: DefId) -> () {
41 | | desc { "trigger a delay span bug" }
... |
1254 | | }
1255 | | }
| | -
| | |
| |_in this expansion of `rustc_query_append!` (#1)
| in this macro invocation (#2)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
and I'm wondering if the lint should skip macros.