-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Object lifetime defaults (RFC 599) #22230
Merged
bors
merged 8 commits into
rust-lang:master
from
nikomatsakis:object-lifetime-defaults-2
Feb 16, 2015
Merged
Object lifetime defaults (RFC 599) #22230
bors
merged 8 commits into
rust-lang:master
from
nikomatsakis:object-lifetime-defaults-2
Feb 16, 2015
Commits on Feb 16, 2015
-
Configuration menu - View commit details
-
Copy full SHA for 931a3c4 - Browse repository at this point
Copy the full SHA 931a3c4View commit details -
Various simplifications and renamings based on the fact that old-scho…
…ol closures are gone and type parameters can now have multiple region bounds (and hence use a different path). Should have no effect on the external behavior of the compiler.
Configuration menu - View commit details
-
Copy full SHA for f5c6a23 - Browse repository at this point
Copy the full SHA f5c6a23View commit details -
Configuration menu - View commit details
-
Copy full SHA for 80d1f14 - Browse repository at this point
Copy the full SHA 80d1f14View commit details -
Factor out the "region substs" creation to occur earlier, so that the
complete set of regions are available when converting types.
Configuration menu - View commit details
-
Copy full SHA for ab57988 - Browse repository at this point
Copy the full SHA ab57988View commit details -
Configuration menu - View commit details
-
Copy full SHA for 369adaf - Browse repository at this point
Copy the full SHA 369adafView commit details -
Fix fallout in libsyntax from RFC 599. Clarity and efficiency seems t…
…o be mostly improved, to my eye. Nonetheless, as this commit demonstrates, the previous commits was a [breaking-change]. In practice, breakage is focused on functions of this form: ```rust fn foo(..., object: Box<FnMut()>) ```` where `FnMut()` could be any trait object type. The older scheme defaulted objects in argument position so that they were bounded by a fresh lifetime: ```rust fn foo<'a>(..., object: Box<FnMut()+'a>) ``` This meant that the object could contain borrowed data. The newer scheme defaults to a lifetime bound of `'static`: ```rust fn foo(..., object: Box<FnMut()+'static>) ``` This means that the object cannot contain borrowed data. In some cases, the best fix is to stop using `Box`: ```rust fn foo(..., object: &mut FnMut()) ``` but another option is to write an explicit annotation for the `'a` lifetime that used to be implicit. Both fixes are demonstrated in this commit.
Configuration menu - View commit details
-
Copy full SHA for f58a1bf - Browse repository at this point
Copy the full SHA f58a1bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for d0ef166 - Browse repository at this point
Copy the full SHA d0ef166View commit details -
Configuration menu - View commit details
-
Copy full SHA for 503e15b - Browse repository at this point
Copy the full SHA 503e15bView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.