-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disallow return types of &'static foo
from being written as &foo
#8309
Comments
The buglet in pull #8308 was found while discussing this issue |
Nominating for Well-Defined. |
I think |
It's a duplicate. |
Closing as dup |
This was referenced Jan 20, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As far as I can tell, when
&str
appears as the return type of a function, this silently implies&'static str
. I think this holds for all other types as well, not juststr
. I propose that we force people to be explicit here, since our general rule is that any borrowed pointer that is returned from a function must have an explicit lifetime.The text was updated successfully, but these errors were encountered: