@fasterthanlime@hachyderm.io Is there any specific reason you used a higher-ranked bound? By saying `for <'s> T: MyTrait<'s>` you are saying "T must be able to be used as MyTrait for every possible lifetime (which includes 'static). The string you have is not static, so Rust tell you it's not general enough. This compiles and should give you the same result: ```rs fn deser_and_staticify<'s, T>( s: &'s str, ) -> Result<<T as IntoStatic>::Output, merde_json::MerdeJsonError<'static>> where T: ValueDeserialize<'s> + IntoStatic, { let deserialized: T = merde_json::from_str_via_value(&s).map_err(|e| e.to_static())?; Ok(deserialized.into_static()) ```
Reply