-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Issue 4846 multiple lifetime parameters #10153
Issue 4846 multiple lifetime parameters #10153
Conversation
r? @pnkfelix |
Also note: I broke things up into logical steps as best I could, but I do not guarantee that each of these steps would build and pass tests on their own. |
Main commits are "Generalize AST and ty::Generics..." and "Introduce new variance inference pass..." |
Hooooly cow. 👍 x 💯 |
@@ -216,17 +216,15 @@ pub enum RegionVariableOrigin { | |||
|
|||
// Region variables created for bound regions | |||
// in a function or method that is called | |||
BoundRegionInFnCall(Span, ty::bound_region), | |||
bound_regionInFnCall(Span, ty::BoundRegion), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bizarre renaming. Same for other variants below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, it is bizarre indeed. (perhaps a search+replace that went awry somewhere?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Wed, Oct 30, 2013 at 06:17:47AM -0700, Seo Sanghyeon wrote:
@@ -216,17 +216,15 @@ pub enum RegionVariableOrigin {
// Region variables created for bound regions // in a function or method that is called
- BoundRegionInFnCall(Span, ty::bound_region),
- bound_regionInFnCall(Span, ty::BoundRegion),
This is a bizarre renaming. Same for other variants below.
Thanks, search-and-replace gone wrong.
You're the best, Niko! 🐱 |
* The `RegionScope` trait controls what happens when the user does | ||
* not specify a region in some location where a region is required | ||
* (e.g., if the user writes `&Foo` as a type rather than `&'a Foo`). | ||
* See the `rscope` module for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't find the contents of the rscope
module to be all that illuminating with regard to this note.
(Did you intend to add some documentation to the rscope::RegionScope
trait? Or perhaps this note is from a previous iteration when rscope.rs
was a larger piece of code?)
Okay, done with the review! It needs a rebase, but you can mark the rebased version with an r+ from me (assuming you don't need another round of review after rebasing). |
used to indicate when anonymous regions (i.e., &T) are permitted
it. This should eventually be merged with the Subst trait.
… old region-parameterization/variance inference. We now compute variance for type parameters but do not make use of it (most of the way towards rust-lang#3598).
This code fits better in check because it is checking that the impl matches the interface. This allows us to avoid the awkward constructions that lazilly collect traits and so forth. It also permits us to make use of the results of variance inference.
all the information it has at its disposal. Unfortunately this also reveals that we need to improve the reporting heuristics further, as sometimes the errors it chooses to emit seem somewhat mystifying and are not related to the actual problem.
…inter to emit the same thing twice in a row
…-parameters-7, r=pnkfelix Fully support multiple lifetime parameters on types and elsewhere, removing special treatment for `'self`. I am submitting this a touch early in that I plan to push a new commit with more tests specifically targeting types with multiple lifetime parameters -- but the current code bootstraps and passes `make check`. Fixes #4846
trim paths in `default_trait_access`/`clone_on_copy` suggestions This should help making the suggestions more palatable. Similar to rust-lang#10153. --- changelog: trim paths in [`default_trait_access`]/[`clone_on_copy`] suggestions
trim paths in `box_default` This might help with rust-lang#10089, though I have not tested that yet. In any event, it keeps the suggestion short and to the point. --- changelog: Trim paths in [`box_default`] suggestion
Fully support multiple lifetime parameters on types and elsewhere, removing special treatment for
'self
. I am submitting this a touch early in that I plan to push a new commit with more tests specifically targeting types with multiple lifetime parameters -- but the current code bootstraps and passesmake check
.Fixes #4846