PSA: Adding `Reflect` as super-trait for `Error`

Shortly before beta was released, there was a push to clean up our story around downcasting, in part by introducing a Reflect marker trait.

The intention was for this to be integrated into the Error trait, which has been the plan since the original RFC, but this step wasn’t taken before the beta by mistake.

I am planning to open a PR adding this bound to Error, as a bug fix. This is a breaking change, but will only break code of the form:

impl<T> Error for MyType<T> { ... }

which will need to change to

impl<T: Any> Error for MyType<T> { ... }
```

Note that code that is changed in this way will continue to work with the original beta release as well as the nightlies, and such `impl`s are expected to be quite rare.
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.