-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
no errors encountered even though delay_span_bug
issued
#93282
Comments
Seems to be introduced in
|
Thanks for the report! A compiler panic is probably best reported in rust-lang/rust, even though it's being surfaced by a dev tool. I'll check with infra to see if it makes sense to move the issue We actually haven't made any changes to rustfmt in that window and the minimal changes that were applied by folks working on the compiler were highly minimal and certainly don't strike me as anything that would be the root cause. As such I suspect this is due to changes made elsewhere within the compiler mods, and would at least like for those folks to be aware (even if we need to make changes on the rustfmt side to address/work around) Would you be up for trying to boil it down to a more simple repro case? |
Sure! Here is a MRE: macro_rules! a { () => { A<'a,> }; }
|
I have bisected to #92876. cc @compiler-errors @calebcartwright I noticed that rustfmt is exiting with 0 even though it panicked. Is that normal? |
I'll look into it today or tomorrow! @rustbot claim |
Outside a macro, no, (as was the case in the original full repro), but yes within the context of a macro as in the minimal rerpo. We have our calls to rustc_parse internals wrapped in This is done partly due to the fact that there are scenarios where those internals panic that we want to wrap to an error type, and partly due to there being some scenarios we want to ignore for the purposes of formatting due to how we attempt to deal with macros in the pre-expansion world where rustfmt lives. The latter being a result of limited macro support and leaving macros it can't handle alone, while carrying on formatting the rest of the file/crate/workspace |
It looks like I'm still getting this error with (Coming from rust-lang/rustfmt#5208 that was closed due to this one) Playground seems to produce it also: |
I'll take another look then. |
Yeah, this continues to ICE even in rustc. Fixed in another PR. fn bar(a: usize, b: usize) -> usize {
a+ b
}
fn main() {
let x = 1;
bar('a, x);
} |
…, r=jackh726 fix ICE when parsing lifetime as function argument I don't really like this, but we basically need to emit an error instead of just delaying an bug, because there are too many places in the AST that aren't covered by my previous PRs... cc: rust-lang#93282 (comment)
…, r=jackh726 fix ICE when parsing lifetime as function argument I don't really like this, but we basically need to emit an error instead of just delaying an bug, because there are too many places in the AST that aren't covered by my previous PRs... cc: rust-lang#93282 (comment)
Reproducible at teloxide-core#828ab071.
Backtrace
The text was updated successfully, but these errors were encountered: