Skip to content
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

New syntax for lifetimes #4846

Closed
nikomatsakis opened this issue Feb 8, 2013 · 9 comments
Closed

New syntax for lifetimes #4846

nikomatsakis opened this issue Feb 8, 2013 · 9 comments
Assignees
Labels
A-lifetimes Area: Lifetimes / regions A-parser Area: The parsing of Rust source code to an AST A-pretty Area: Pretty printing (including `-Z unpretty`) A-type-system Area: Type system C-enhancement Category: An issue proposing an enhancement or a PR with one. E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot.

Comments

@nikomatsakis
Copy link
Contributor

As described in this mailing list thread:

https://mail.mozilla.org/pipermail/rust-dev/2013-February/003105.html

nikomatsakis added a commit to nikomatsakis/rust that referenced this issue Feb 8, 2013
nikomatsakis added a commit to nikomatsakis/rust that referenced this issue Feb 28, 2013
Major changes are:
- replace ~[ty_param] with Generics structure, which includes
  both OptVec<TyParam> and OptVec<Lifetime>;
- the use of syntax::opt_vec to avoid allocation for empty lists;

cc rust-lang#4846
bors added a commit that referenced this issue Feb 28, 2013
… r=nikomatsakis

Major changes are:
- replace ~[ty_param] with Generics structure, which includes
  both OptVec<TyParam> and OptVec<Lifetime>;
- the use of syntax::opt_vec to avoid allocation for empty lists;

cc #4846

r? @graydon
bors added a commit that referenced this issue Mar 6, 2013
… r=nikomatsakis

Work towards #4846.

- Institute new region defaults where all omitted regions get a fresh lifetime.
- Require explicit region names except in functions.
- Fix a bug in region parameterization inference.  I've been putting this off because it will not be important when we remove RP inference in favor of explicit declarations, but then it was blocking this patch.

r? @pcwalton
nikomatsakis added a commit to nikomatsakis/rust that referenced this issue Mar 20, 2013
and the fn_ctxt doesn't need any self_info field at all.

Step towards fixing `fn(&self)` (cc rust-lang#4846) to have a distinct
lifetime.
bors added a commit that referenced this issue Mar 20, 2013
…, r=nikomatsakis

Refactor the self-info so that the def-id is carried in ty_self()and the fn_ctxt doesn't need any self_info field at all. Pull out explicit self transformation into `check_method`. Step towards fixing `fn(&self)` to have a distinct lifetime. (cc #4846) 

r? @catamorphism
@nikomatsakis
Copy link
Contributor Author

@graydon not 100%, what remains is:

  • removing region parameterization inference from the compiler
  • supporting multiple lifetimes parameter on a type
  • supporting lifetime parameters whose name is not 'self

I was hoping to do this for 0.7

@emberian
Copy link
Member

@nikomatsakis additionally the pretty printer or whatever it is that diagnostics use (ty_to_str I think? Not sure) still use the old syntax.

@bors bors closed this as completed in 8379890 Nov 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lifetimes Area: Lifetimes / regions A-parser Area: The parsing of Rust source code to an AST A-pretty Area: Pretty printing (including `-Z unpretty`) A-type-system Area: Type system C-enhancement Category: An issue proposing an enhancement or a PR with one. E-hard Call for participation: Hard difficulty. Experience needed to fix: A lot.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants