Why does a lazy-static value claim to not implement a trait that it clearly implements?
The compiler isn’t lying to you, you are just skipping over a relevant detail of the error message. Here’s a self-contained example: #[macro_use] extern crate lazy_static; struct Example; trait ExampleTrait {} impl ExampleTrait for Example {} lazy_static! { static ref EXAMPLE: Example = Example; } fn must_have_trait<T>(_: T) where T: ExampleTrait, { } fn main() … Read more