Hello, I’ve come into a situation where the user implements some trait for some type “Inner”, and then may use another (freely-implemented) “Outer” type (which uses the user’s Inner impl).
here’s the playground link (115 loc).
The trait has two functions (a and b), but the user may really use only one of them (a).
The other function (b) has a default impl (which panics), so the user is not bothered with it when implementing (a).
Is it possible to confirm that this default method (b), which just panics, is never “actually called” at compile-time (rather than having a runtime panic)?
The example includes a situation where the Outer type defines the (b), so it’s available for usage, and specializes (a) into panicking. Would it also be possible to confirm in compile-time that (b), from Outer’s, is never “actually called”?
Thanks a lot!