This code compiles causing conversion of &str to &'static str:
#[mockable]fnterrible(_:&str) -> &'staticstr{"a"}#[test]fnterrible_test(){// This closure has type `for <'a> fn(&'a str) -> MockResult<(&'a str,), &'a str>`
terrible.mock_safe(|a| MockResult::Return(a));let x = "abc".to_string();let y = x.as_str();let z:&'staticstr = terrible(y);assert_eq!("abc", z);}
This code compiles causing conversion of
&strto&'static str: