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'm not sure whether the code should be accepted, given that the current compiler warns that the impl w/o the dyn is deprecated, but I figure async_trait might want to either accept w/ a similar warning, or at the very least reject with a clearer error message.
(I mostly stumbled into this; I do not think the impl is anything close to what I actually want in my real-world use case. The compiler's insistence on dyn is nice though, since it clued me in that I'm barking up the wrong syntactical tree.)
The text was updated successfully, but these errors were encountered:
In non-async-trait code, this is currently legal, though it emits a warning that it should have the
dyn
keyword:In async-trait code, this causes a panic:
A full example in the Playground
I'm not sure whether the code should be accepted, given that the current compiler warns that the
impl
w/o thedyn
is deprecated, but I figureasync_trait
might want to either accept w/ a similar warning, or at the very least reject with a clearer error message.(I mostly stumbled into this; I do not think the
impl
is anything close to what I actually want in my real-world use case. The compiler's insistence ondyn
is nice though, since it clued me in that I'm barking up the wrong syntactical tree.)The text was updated successfully, but these errors were encountered: