Skip to content

Conversation

@A4-Tacks
Copy link
Member

Input (bar!):

/// foo![]
#[macro_export]
macro_rules! foo { () => {}; }
pub use crate::foo as bar;

fn main() {
    $0
}

Old output:

/// foo![]
#[macro_export]
macro_rules! foo { () => {}; }
pub use crate::foo as bar;

fn main() {
    bar!($0)
}

This PR output:

/// foo![]
#[macro_export]
macro_rules! foo { () => {}; }
pub use crate::foo as bar;

fn main() {
    bar![$0]
}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 12, 2025
@ChayimFriedman2
Copy link
Contributor

I don't think this needs to be in the docs. This probably deserves a #[rust_analyzer::] attribute.

@Veykril
Copy link
Member

Veykril commented Dec 21, 2025

I think we do want to keep the doc trick here as a good heuristic, but a rust-analyzer attribute would be nice to have for this as well

@Veykril Veykril added this pull request to the merge queue Dec 21, 2025
Merged via the queue into rust-lang:master with commit 14cc41f Dec 21, 2025
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 21, 2025
@A4-Tacks A4-Tacks deleted the fix-guess-renamed-macro-braces branch December 21, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants