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.
Diagnose
1 parent cf16365 commit 29c96a7Copy full SHA for 29c96a7
src/diagnostic.rs
@@ -163,7 +163,7 @@ pub(crate) use diagnostic_url;
163
/// An extension trait for `Result<_, E>`, where `E` is an implementation of
164
/// [`Diagnostic`], that converts `E` into [`Report<E>`](`Report`), yielding
165
/// `Result<_, Report<E>>`.
166
-pub trait Diagnose<'s, T> {
+pub trait Diagnose<'s, T>: private::Sealed {
167
/// The error type returned from `diagnose` and `diagnose_with`.
168
type Error: Diagnostic;
169
@@ -224,6 +224,11 @@ where
224
}
225
226
227
+mod private {
228
+ pub trait Sealed {}
229
+ impl<T, E> Sealed for Result<T, E> {}
230
+}
231
+
232
#[cfg(test)]
233
mod tests {
234
use super::*;
0 commit comments