Closed
Description
The new lifetime elision rules recently landed, but the error messages for the rules do not reflect the RFC. The function
fn test(s: &str, t: &str) -> &str {
s
}
produces the error
elision.rs:1:30: 1:34 error: missing lifetime specifier [E0106]
elision.rs:1 fn test(s: &str, t: &str) -> &str {
^~~~
The error messages are critical for providing a gentle slope from the intuition of borrowing to the mechanism of lifetimes.