hello and thanks for this crate !
it seems multiversion proc macro is messing up something in functions returning a static lifetime (typically functions returning strings, or owned Cow ...)
here is a minimal example
use multiversion::multiversion;
#[multiversion(targets = "simd")]
fn foo(a: u32) -> &'static [u8] {
"hello".as_bytes()
}
producing this:
error[E0261]: use of undeclared lifetime name `'__mv_inner_static`
--> src/bin.rs:7:20
|
6 | #[multiversion(targets = "simd")]
| - lifetime `'__mv_inner_static` is missing in item created through this procedural macro
7 | fn foo(a: u32) -> &'static [u8] {
| ^^^^^^^ undeclared lifetime
|
help: consider introducing lifetime `'__mv_inner_static` here
|
6 | #[multiversion(targets = "simd")]<'__mv_inner_static>
| ++++++++++++++++++++
of cours in my real case i wasn't using strings, but Cow of vector values
versions:
- cargo: 1.93.0
- rustc: 1.93.0
- multiversion: 0.8.0
hello and thanks for this crate !
it seems multiversion proc macro is messing up something in functions returning a static lifetime (typically functions returning strings, or owned Cow ...)
here is a minimal example
producing this:
of cours in my real case i wasn't using strings, but
Cowof vector valuesversions: