Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show docs on a function with attribute macro show signature of an expanded item inside the function #17205

Open
mrnossiom opened this issue May 8, 2024 · 0 comments
Labels
C-bug Category: bug

Comments

@mrnossiom
Copy link
Contributor

code snippet to reproduce (repro link below):

#[tracing::instrument]
fn foobar() {
	// ↑↑ Hover or trigger docs on `foobar`

	// See how it shows:
	// `let __tracing_attr_fake_return: ()`
	// instead of function signature
	// `fn foobar()`
}

I would expect to see the function signature of fn foobar but I have the signature of tracing's macro let variable.

image

You can check macro expansion here : https://github.com/mrnossiom/ra-show-docs-macro/blob/main/expansion.rs

Meta

  • rust-analyzer version: rust-analyzer 1.77.1 (7cf61eb 2024-03-27)
  • rustc version: rustc 1.77.1 (7cf61ebde 2024-03-27)
  • editor or extension: just plain LSP with helix 24.3 (2cadec0b)
  • relevant settings: (none?)
  • repro link: https://github.com/mrnossiom/ra-show-docs-macro
@mrnossiom mrnossiom added the C-bug Category: bug label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

1 participant