You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just updated from version 0.13.0 to the latest version, and I've encountered compilation issues with some of my code. Below is a short example of the code that successfully compiled in version 0.13.0 but fails now.
error[E0225]: only auto traits can be used as additional traits in a trait object
--> src\mock.rs:17:33
|
17 | F: FnOnce() -> () + Clone + 'static,
| -------------- ^^^^^ additional non-auto trait
| |
| first non-auto trait
|
= help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: FnOnce<()> + Clone {}`
= note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
The text was updated successfully, but these errors were encountered:
This is probably a result of #606 . And though it's annoying, the new behavior is probably the correct behavior. I'm sorry about the regression. Did you try following the compiler's advice and defining a new trait?
@asomers , thank you for your reply! You were right, I was able to fix the issue by adding a super trait. However, I still believe it would be appropriate to bump the minor version of the crate, as it has a breaking change.
Hello,
I just updated from version 0.13.0 to the latest version, and I've encountered compilation issues with some of my code. Below is a short example of the code that successfully compiled in version 0.13.0 but fails now.
Error
The text was updated successfully, but these errors were encountered: