-
Notifications
You must be signed in to change notification settings - Fork 12.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
ICE failed while formatting fluent string parse_help_set_edition_standalone
#122130
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
matthiaskrgr
added
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
C-bug
Category: This is a bug.
labels
Mar 7, 2024
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Mar 7, 2024
jieyouxu
added
the
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
label
Mar 7, 2024
Slightly smaller: enum will {
s#[c"owned_box"]
} |
HelpUseLatestEdition::new().add_to_diagnostic(&mut err); Somehow this subdiag enum #[derive(Subdiagnostic)]
pub enum HelpUseLatestEdition {
#[help(parse_help_set_edition_cargo)]
#[note(parse_note_edition_guide)]
Cargo { edition: Edition },
#[help(parse_help_set_edition_standalone)]
#[note(parse_note_edition_guide)]
Standalone { edition: Edition },
}
impl HelpUseLatestEdition {
pub fn new() -> Self {
let edition = LATEST_STABLE_EDITION;
if rustc_session::utils::was_invoked_from_cargo() {
Self::Cargo { edition }
} else {
Self::Standalone { edition }
}
}
} being added to a diagnostic causes
but the |
Also suspicious:
|
Seems like for the subdiag |
jhpratt
added a commit
to jhpratt/rust
that referenced
this issue
Mar 9, 2024
…latest-edition, r=cjgillot Eagerly translate `HelpUseLatestEdition` in parser diagnostics Fixes rust-lang#122130. This makes me suspicious of these other two usage of `add_to_diagnostic()`. Would they *also* crash? I haven't attempted to construct test cases for them. ``` compiler/rustc_parse/src/parser/expr.rs 3453: errors::HelpUseLatestEdition::new().add_to_diagnostic(e); compiler/rustc_hir_typeck/src/expr.rs 2603: HelpUseLatestEdition::new().add_to_diagnostic(&mut err); ``` This also seems like a footgun?
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Mar 9, 2024
…latest-edition, r=cjgillot Eagerly translate `HelpUseLatestEdition` in parser diagnostics Fixes rust-lang#122130. This makes me suspicious of these other two usage of `add_to_diagnostic()`. Would they *also* crash? I haven't attempted to construct test cases for them. ``` compiler/rustc_parse/src/parser/expr.rs 3453: errors::HelpUseLatestEdition::new().add_to_diagnostic(e); compiler/rustc_hir_typeck/src/expr.rs 2603: HelpUseLatestEdition::new().add_to_diagnostic(&mut err); ``` This also seems like a footgun?
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Mar 9, 2024
Rollup merge of rust-lang#122160 - jieyouxu:eager-translate-help-use-latest-edition, r=cjgillot Eagerly translate `HelpUseLatestEdition` in parser diagnostics Fixes rust-lang#122130. This makes me suspicious of these other two usage of `add_to_diagnostic()`. Would they *also* crash? I haven't attempted to construct test cases for them. ``` compiler/rustc_parse/src/parser/expr.rs 3453: errors::HelpUseLatestEdition::new().add_to_diagnostic(e); compiler/rustc_hir_typeck/src/expr.rs 2603: HelpUseLatestEdition::new().add_to_diagnostic(&mut err); ``` This also seems like a footgun?
jieyouxu
added
A-diagnostics
Area: Messages for errors, warnings, and lints
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Mar 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
C-bug
Category: This is a bug.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-has-mcve
Status: A Minimal Complete and Verifiable Example has been found for this issue
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
auto-reduced (treereduce-rust):
original:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
The text was updated successfully, but these errors were encountered: