Proc macro `fastrace::trace` consistently breaks tooltips
Opened this issue · 2 comments
rust-analyzer version: rust-analyzer version: 1.91.0 (f8297e3 2025-10-28) [/usr/local/rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rust-analyzer]
rustc version: rustc 1.91.0 (f8297e351 2025-10-28)
editor or extension: 0.3.2667
relevant settings: (eg. client settings, or environment variables like CARGO, RUSTC, RUSTUP_HOME or CARGO_HOME)
repository link (if public, optional): (private)
code snippet to reproduce:
#[fastrace::trace]
fn traced_fn(data: Vec<u64>) -> impl Iterator<Item = u64> {
data.into_iter()
}
fn untraced_fn(data: Vec<u64>) -> impl Iterator<Item = u64> {
data.into_iter()
}With the #[fastrace::trace] proc macro:
Without:
Obviously, the latter is what I'd expect to see. This is consistently reproducible when using the fastrace::trace proc macro.
That's due to how the macro uses spans. I don't think we can change this, the macro should be changed.
That's due to how the macro uses spans. I don't think we can change this, the macro should be changed.
Could you give some guidance on what the problem is, specifically (i.e. "don't do this" or "this line here is the problem")?