-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional trait restrictions prevent use of trait methods #44064
Comments
So to fix this we just need to forward |
After thoughts on filing this issue: I guess the question is "should adding a provided method on a trait be a breaking change for multi-trait trait objects in the event that ambiguity between methods for multiple traits is introduced by the provided method's presence?" Which I think the answer is no, so yeah it makes sense to prevent method calls in this way, but perhaps the compiler could give a better syntax hint as to what should be done instead. I wouldn't be opposed to an impl for |
So I'm going to close this issue. |
Adding Send + Sync restrictions to an Any trait object causes the trait object to lose the downcast_ref method
https://play.rust-lang.org/?gist=9c665d721a9c6a2845f55e56d97ffe27&version=stable
I would expect main_3 to compile, because main_2 compiles, however main_3 fails to compile with the error
Meta
$ rustc --version
rustc 1.19.0 (0ade339 2017-07-17)
The text was updated successfully, but these errors were encountered: