From 842abe5c27204242b0fe714e9115271b56509abe Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sat, 2 Nov 2024 18:01:31 +0100 Subject: [PATCH] Emit struct in `#[tracked]` fn last for better IDE support --- components/salsa-macro-rules/src/setup_tracked_fn.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/salsa-macro-rules/src/setup_tracked_fn.rs b/components/salsa-macro-rules/src/setup_tracked_fn.rs index 3c85af79..b6182241 100644 --- a/components/salsa-macro-rules/src/setup_tracked_fn.rs +++ b/components/salsa-macro-rules/src/setup_tracked_fn.rs @@ -67,11 +67,6 @@ macro_rules! setup_tracked_fn { $inner:ident, ] ) => { - #[allow(non_camel_case_types)] - $vis struct $fn_name { - _priv: std::convert::Infallible, - } - // Suppress this clippy lint because we sometimes require `'db` where the ordinary Rust rules would not. #[allow(clippy::needless_lifetimes)] $(#[$attr])* @@ -288,5 +283,10 @@ macro_rules! setup_tracked_fn { } }) } + + #[allow(non_camel_case_types)] + $vis struct $fn_name { + _priv: std::convert::Infallible, + } }; }