error: implementation of `FromZval` is not general enough
--> proj4rs-php/src/lib.rs:188:1
|
188 | #[php_module]
| ^^^^^^^^^^^^^ implementation of `FromZval` is not general enough
|
= note: `FromZval<'0>` would have to be implemented for the type `&str`, for any lifetime `'0`...
= note: ...but `FromZval<'1>` is actually implemented for the type `&'1 str`, for some specific lifetime `'1`
= note: this error originates in the attribute macro `php_module` (in Nightly builds, run with -Z macro-backtrace for more info)
Removing the #[getter] macro makes compilation succeed.
Returning static str reference from class getter fail to build witth the error:
implementation of
FromZvalis not general enough
Example:
Fail to complie with the error:
Removing the
#[getter]
macro makes compilation succeed.