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 9078570 commit c055edfCopy full SHA for c055edf
src/lib.rs
@@ -211,6 +211,17 @@
211
//! // Use `#[diagnostic(transparent)]` to wrap another [`Diagnostic`]. You won't see labels otherwise
212
//! #[diagnostic(transparent)]
213
//! AnotherError(#[from] AnotherError),
214
+//!
215
+//! /// Forward the diagnostic to a particular field.
216
+//! #[error("other error")]
217
+//! #[diagnostic(forward(the_actual_diagnostic))]
218
+//! EvenMoreData {
219
+//! unrelated_field_1: String,
220
+//! unrelated_field_2: usize,
221
222
+//! #[source]
223
+//! the_actual_diagnostic: AnotherError,
224
+//! }
225
//! }
226
//!
227
//! #[derive(Error, Diagnostic, Debug)]
0 commit comments