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 58edd7f commit 27c0c46Copy full SHA for 27c0c46
compiler/rustc_errors/src/diagnostic_impls.rs
@@ -177,6 +177,14 @@ impl IntoDiagnosticArg for type_ir::FloatTy {
177
}
178
179
180
+impl IntoDiagnosticArg for ast::Visibility {
181
+ fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> {
182
+ let s = pprust::vis_to_string(&self);
183
+ let s = s.trim_end().to_string();
184
+ DiagnosticArgValue::Str(Cow::Owned(s))
185
+ }
186
+}
187
+
188
impl IntoDiagnosticArg for Level {
189
fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static> {
190
DiagnosticArgValue::Str(Cow::Borrowed(match self {
0 commit comments