File tree 1 file changed +6
-0
lines changed
compiler/rustc_errors/src
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,12 @@ where
148
148
/// converted rather than on `DiagArgValue`, which enables types from other `rustc_*` crates to
149
149
/// implement this.
150
150
pub trait IntoDiagArg {
151
+ /// Convert `Self` into a `DiagArgValue` suitable for rendering in a diagnostic.
152
+ ///
153
+ /// It takes a `path` where "long values" could be written to, if the `DiagArgValue` is too big
154
+ /// for displaying on the terminal. This path comes from the `Diag` itself. When rendering
155
+ /// values that come from `TyCtxt`, like `Ty<'_>`, they can use `TyCtxt::short_string`. If a
156
+ /// value has no shortening logic that could be used, the argument can be safely ignored.
151
157
fn into_diag_arg ( self , path : & mut Option < std:: path:: PathBuf > ) -> DiagArgValue ;
152
158
}
153
159
You can’t perform that action at this time.
0 commit comments