You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Edit: So it could also be 'static, but I wouldn't have thought that would be the default (or encouraged) case. If you did want it to be static, then you could declare it explicitly. Similar to how variables are immutable by default (without needing an explicit declaration), yet if you want them to be mutable you declare it.
The text was updated successfully, but these errors were encountered:
Issue by mhart
Tuesday Nov 04, 2014 at 18:07 GMT
For earlier discussion, see rust-lang/rust#18620
This issue was labelled with: in the Rust repository
Rust newbie here. This is very probably a dupe, but my GH foo failed me.
The following fails to compile:
With:
But it's unclear to me why the compiler can't just infer the lifetime here?
Shouldn't this be the default choice?
Edit: So it could also be
'static
, but I wouldn't have thought that would be the default (or encouraged) case. If you did want it to be static, then you could declare it explicitly. Similar to how variables are immutable by default (without needing an explicit declaration), yet if you want them to be mutable you declare it.The text was updated successfully, but these errors were encountered: