Skip to content

Allow defining inline structs in diagnostics!#21798

Open
ada4a wants to merge 2 commits intorust-lang:masterfrom
ada4a:push-wozppxtwszlk
Open

Allow defining inline structs in diagnostics!#21798
ada4a wants to merge 2 commits intorust-lang:masterfrom
ada4a:push-wozppxtwszlk

Conversation

@ada4a
Copy link
Contributor

@ada4a ada4a commented Mar 10, 2026

Just a random TODO comment I thought I'd implement. I have some doubts about this though:

  • is this still desired?
  • is removing pub and struct really worth it? I feel like one'd write them almost instinctively and be surprised when it doesn't work. Maybe I could adjust the macro to look for $($($vis:vis)? strukt:ident)? instead?
  • the macro definition ended up being somewhat cursed
  • formatting is completely broken

Also, the diff is pretty hard to review, sorry about that. I found that commenting out IncorrectCase helped a little bit, hence the second commit that uncomments it.

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

I personally think the old way is fine, and don't want this change.

@lnicola
Copy link
Member

lnicola commented Mar 11, 2026

Not sure about the complexity, but that enum is a bit weird, do we still want it to be an enum in the long run?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants