Closed
Description
I wrote Box::new(telemetry_t::new()).into_raw()
and got this output:
src/lib.rs:41:34: 41:44 error: no method named `into_raw` found for type `Box<telemetry_t>` in the current scope
src/lib.rs:41 Box::new(telemetry_t::new()).into_raw()
^~~~~~~~~~
src/lib.rs:41:34: 41:44 note: found defined static methods, maybe a `self` is missing?
src/lib.rs:41:34: 41:44 note: candidate #1 is defined in an impl for the type `Box<_>`
src/lib.rs:41 Box::new(telemetry_t::new()).into_raw()
^~~~~~~~~~
The hint in particular was confusing, since it is targeted at developers who created the impl and forgot to provide a self
argument, rather than consumers of an impl that is specifically designed to be static.