File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88## Unreleased
99
1010### Changed
11-
11+ - Sealed the ` Diagnose ` trait.
1212- Implementation of the ` Default ` trait for ` Pointer ` now doesn't constrain the lifetime.
1313
1414## [ 0.7.1] 2025-02-16
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ pub(crate) use diagnostic_url;
163163/// An extension trait for `Result<_, E>`, where `E` is an implementation of
164164/// [`Diagnostic`], that converts `E` into [`Report<E>`](`Report`), yielding
165165/// `Result<_, Report<E>>`.
166- pub trait Diagnose < ' s , T > {
166+ pub trait Diagnose < ' s , T > : private :: Sealed {
167167 /// The error type returned from `diagnose` and `diagnose_with`.
168168 type Error : Diagnostic ;
169169
@@ -224,6 +224,11 @@ where
224224 }
225225}
226226
227+ mod private {
228+ pub trait Sealed { }
229+ impl < T , E > Sealed for Result < T , E > { }
230+ }
231+
227232#[ cfg( test) ]
228233mod tests {
229234 use super :: * ;
You can’t perform that action at this time.
0 commit comments