We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 059cc85 commit adecd66Copy full SHA for adecd66
compiler/rustc_errors/src/diagnostic_impls.rs
@@ -5,6 +5,7 @@ use std::num::ParseIntError;
5
use std::path::{Path, PathBuf};
6
use std::process::ExitStatus;
7
8
+use rustc_ast::token::NonterminalKind;
9
use rustc_ast_pretty::pprust;
10
use rustc_macros::Subdiagnostic;
11
use rustc_span::edition::Edition;
@@ -304,6 +305,12 @@ impl IntoDiagArg for hir::def::Namespace {
304
305
}
306
307
308
+impl IntoDiagArg for NonterminalKind {
309
+ fn into_diag_arg(self) -> DiagArgValue {
310
+ DiagArgValue::Str(Cow::from(self.to_string()))
311
+ }
312
+}
313
+
314
#[derive(Clone)]
315
pub struct DiagSymbolList<S = Symbol>(Vec<S>);
316
0 commit comments