Auto merge of #118655 - compiler-errors:rollup-vrngyzn, r=compiler-errors
Rollup of 9 pull requests Successful merges: - #117793 (Update variable name to fix `unused_variables` warning) - #118123 (Add support for making lib features internal) - #118268 (Pretty print `Fn<(..., ...)>` trait refs with parentheses (almost) always) - #118346 (Add `deeply_normalize_for_diagnostics`, use it in coherence) - #118350 (Simplify Default for tuples) - #118450 (Use OnceCell in cell module documentation) - #118585 (Fix parser ICE when recovering `dyn`/`impl` after `for<...>`) - #118587 (Cleanup error handlers some more) - #118642 (bootstrap(builder.rs): Don't explicitly warn against `semicolon_in_expressions_from_macros`) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
1dd4db5062
53 changed files with 552 additions and 572 deletions
|
@ -1,5 +1,5 @@
|
|||
use rustc_errors::{
|
||||
AddToDiagnostic, DiagnosticBuilder, EmissionGuarantee, Handler, IntoDiagnostic, MultiSpan,
|
||||
AddToDiagnostic, DiagnosticBuilder, ErrorGuaranteed, Handler, IntoDiagnostic, MultiSpan,
|
||||
SingleLabelManySpans,
|
||||
};
|
||||
use rustc_macros::{Diagnostic, Subdiagnostic};
|
||||
|
@ -446,9 +446,9 @@ pub(crate) struct EnvNotDefinedWithUserMessage {
|
|||
}
|
||||
|
||||
// Hand-written implementation to support custom user messages.
|
||||
impl<'a, G: EmissionGuarantee> IntoDiagnostic<'a, G> for EnvNotDefinedWithUserMessage {
|
||||
impl<'a> IntoDiagnostic<'a> for EnvNotDefinedWithUserMessage {
|
||||
#[track_caller]
|
||||
fn into_diagnostic(self, handler: &'a Handler) -> DiagnosticBuilder<'a, G> {
|
||||
fn into_diagnostic(self, handler: &'a Handler) -> DiagnosticBuilder<'a, ErrorGuaranteed> {
|
||||
#[expect(
|
||||
rustc::untranslatable_diagnostic,
|
||||
reason = "cannot translate user-provided messages"
|
||||
|
@ -801,8 +801,8 @@ pub(crate) struct AsmClobberNoReg {
|
|||
pub(crate) clobbers: Vec<Span>,
|
||||
}
|
||||
|
||||
impl<'a, G: EmissionGuarantee> IntoDiagnostic<'a, G> for AsmClobberNoReg {
|
||||
fn into_diagnostic(self, handler: &'a Handler) -> DiagnosticBuilder<'a, G> {
|
||||
impl<'a> IntoDiagnostic<'a> for AsmClobberNoReg {
|
||||
fn into_diagnostic(self, handler: &'a Handler) -> DiagnosticBuilder<'a, ErrorGuaranteed> {
|
||||
let mut diag =
|
||||
handler.struct_diagnostic(crate::fluent_generated::builtin_macros_asm_clobber_no_reg);
|
||||
diag.set_span(self.spans.clone());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue