-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Do not panic when analyzing the malformed origin of a format string #10401
Conversation
r? @Alexendoo (rustbot has picked a reviewer for you, use r? to override) |
Thanks! We have a nice utility for testing proc macro weirdness, you can add // aux-build: proc_macro_with_span.rs
#[macro_use]
extern crate proc_macro_with_span; to with_span!(""something format!("")); |
f4c6ade
to
64775f3
Compare
Nice indeed! I've added a test, without even having to write a proc_macro, confirmed panicking before this patch. |
Great, thanks again! @bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Fixes #10148. This will trigger only when generating format strings while accepting weird things in a procedural macro and setting the span to something which is not a string.
changelog: none