Skip to content

fix: shrink the span of errors from attribute macros and derives #11238

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

Merged
merged 2 commits into from
Jan 8, 2022
Merged

fix: shrink the span of errors from attribute macros and derives #11238

merged 2 commits into from
Jan 8, 2022

Conversation

jonas-schievink
Copy link
Contributor

Some procedural macros tend to get very large invocations, for example RTIC's, leading to issues like rtic-rs/rtic#582, where almost the entire screen is underlined while editing incomplete code in the macro.

This PR shrinks the spans of errors from attribute macros and derives to point only at the attribute, which also matches rustc more closely.

bors r+

bors bot added a commit that referenced this pull request Jan 8, 2022
11238: fix: shrink the span of errors from attribute macros and derives r=jonas-schievink a=jonas-schievink

Some procedural macros tend to get very large invocations, for example RTIC's, leading to issues like rtic-rs/rtic#582, where almost the entire screen is underlined while editing incomplete code in the macro.

This PR shrinks the spans of errors from attribute macros and derives to point only at the attribute, which also matches rustc more closely.

bors r+

Co-authored-by: Jonas Schievink <[email protected]>
@bors
Copy link
Contributor

bors bot commented Jan 8, 2022

Canceled.

@jonas-schievink
Copy link
Contributor Author

bors r+

@bors
Copy link
Contributor

bors bot commented Jan 8, 2022

@bors bors bot merged commit 0f8c96c into rust-lang:master Jan 8, 2022
@jonas-schievink jonas-schievink deleted the shrink-macro-error-spans-2 branch January 8, 2022 14:55
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.

1 participant