Repository: rust
Issue: Misleading code change suggestion in E0106
Labels: T-compiler,C-bug,A-suggestion-diagnostics

I'm writing this in relation to the following StackOverflow question:

https://stackoverflow.com/q/54217705/1091116

Consider the following code:

```rust
    extern crate clap;
    use clap::{App};
    
    use std::io;
    
    fn parse_argv() -> &'static clap::ArgMatches {
        return App::new("example")
        .get_matches()
    }
    
    fn main() -> io::Result<()> {
    
        let matches = parse_argv();
    
        Ok(())
    }
```

This is the error:

<!-- language: none -->
                                                                                                                                                                                                                                                                      
    error[E0106]: missing lifetime specifier                                                                                                                                                                                                                                                                                                                                   
     --> src/main.rs:6:29                                                                                                                                                                                                                                                                                                                                                      
      |                                                                                                                                                                                                                                                                                                                                                                        
    6 | fn parse_argv() -> &'static clap::ArgMatches {                                                                                                                                                                                                                                                                                                                         
      |                             ^^^^^^^^^^^^^^^^ help: consider giving it a 'static lifetime: `clap::ArgMatches + 'static`                                                                                                                                                                                                                                                 
      |                                                                                                                                                                                                                                                                                                                                                                        
      = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from

Now, the part that is troublesome is: 

      help: consider giving it a 'static lifetime: `clap::ArgMatches + 'static`

I believe that compiler should give a clearer error message here, a suggestion on how to proceed or no code change suggestion at all. Doing as the compiler suggests doesn't solve them problem and results in the error message not going away.