-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-translationArea: Translation infrastructure, and migrating existing diagnostics to SessionDiagnosticArea: Translation infrastructure, and migrating existing diagnostics to SessionDiagnosticP-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Code
#![feature(box_syntax)]
fn main() {}
Current output
error[E0557]: feature has been removed
--> foo.rs:1:12
|
1 | #![feature(box_syntax)]
| ^^^^^^^^^^ feature has been removed
|
= note: replaced with `#[rustc_box]`
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0557`.
Desired output
The note ("replaced with #[rustc_box]
") should be translatable, rather than hard-coded in compiler/rustc_feature/src/removed.rs
.
Rationale and extra context
The reason
field in RemovedFeature
cannot simply be replaced with a DiagMessage
because rustc_features
cannot depend on rustc_errors
(cyclic dependency). I don't know how to solve this.
Other cases
No response
Rust Version
rustc 1.79.0-nightly (79424056b 2024-04-12)
binary: rustc
commit-hash: 79424056b05eaa9563d16dfab9b9a0c8f033f220
commit-date: 2024-04-12
host: x86_64-unknown-linux-gnu
release: 1.79.0-nightly
LLVM version: 18.1.3
Anything else?
No response
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-translationArea: Translation infrastructure, and migrating existing diagnostics to SessionDiagnosticArea: Translation infrastructure, and migrating existing diagnostics to SessionDiagnosticP-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.