Closed
Description
What it does
Detect .type_id()
calls on Box<dyn Trait>
when trait Trait: Any {...}
Advantage
Less annoying-to-find mistakes on Any traits
Drawbacks
No response
Example
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);
}
Activity
type_id_on_box
]: lint on anyBox<dyn _>
#11350Auto merge of #11350 - y21:issue11349, r=xFrednet