We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
type_id_on_box
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
Detect .type_id() calls on Box<dyn Trait> when trait Trait: Any {...}
.type_id()
Box<dyn Trait>
trait Trait: Any {...}
Less annoying-to-find mistakes on Any traits
No response
use std::any::Any; trait Test: Any {} impl Test for i32 {} fn main() { let b: Box<dyn Test> = Box::new(0); let ty = b.type_id(); dbg!(ty); }
playground link
The text was updated successfully, but these errors were encountered:
Box<dyn _>
3787a0c
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
What it does
Detect
.type_id()
calls onBox<dyn Trait>
whentrait Trait: Any {...}
Advantage
Less annoying-to-find mistakes on Any traits
Drawbacks
No response
Example
playground link
The text was updated successfully, but these errors were encountered: