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

Replace unsafety in middle::ty with lifetimes. #18483

Merged
merged 9 commits into from
Nov 19, 2014
Merged

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Oct 31, 2014

After more than a month of sitting on this patch, rebasing and tracking down some nasty bugs (there's might be still one out there, but it only manifested in middle::trans::reflect which is now gone), I'd like to merge it as it is.

This changeset makes middle::ty safe, linking the lifetime of a type to the type context it was created in.
It's a prerequisite for introducing function-local type contexts to localize types with inference variables, in order to (potentially) free hundreds of MBs from rustc's memory usage peak.

@rust-highfive
Copy link
Collaborator

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@eddyb eddyb assigned eddyb and nikomatsakis and unassigned eddyb Oct 31, 2014
@eddyb eddyb force-pushed the safe-ty branch 3 times, most recently from 71a8e82 to 315aa8d Compare November 1, 2014 18:21
@nikomatsakis
Copy link
Contributor

This is cool stuff

@eddyb eddyb force-pushed the safe-ty branch 2 times, most recently from 0448038 to 3a00e42 Compare November 5, 2014 21:14
@eddyb
Copy link
Member Author

eddyb commented Nov 5, 2014

r? @nikomatsakis

@eddyb eddyb force-pushed the safe-ty branch 2 times, most recently from f58aad6 to d12acd8 Compare November 6, 2014 09:35
@nikomatsakis
Copy link
Contributor

r+

@eddyb from what I can tell, this PR is a work of art. Thanks for doing such a good job separating out the commits like you did, that really makes this easier to read.

@nikomatsakis
Copy link
Contributor

@eddyb btw I put the r+ on the PR, not the commit, so you could address the question regarding the comparison.

@nikomatsakis
Copy link
Contributor

@eddyb #18784 I guess? Frustrating.

@eddyb eddyb force-pushed the safe-ty branch 4 times, most recently from a0d0b39 to 789797b Compare November 19, 2014 00:39
bors added a commit that referenced this pull request Nov 19, 2014
After more than a month of sitting on this patch, rebasing and tracking down some nasty bugs (there's might be still one out there, but it only manifested in `middle::trans::reflect` which is now gone), I'd like to merge it as it is.

This changeset makes middle::ty safe, linking the lifetime of a type to the type context it was created in.
It's a prerequisite for introducing function-local type contexts to localize types with inference variables, in order to (potentially) free hundreds of MBs from rustc's memory usage peak.
@bors bors closed this Nov 19, 2014
@bors bors merged commit bf0766a into rust-lang:master Nov 19, 2014
@nikomatsakis
Copy link
Contributor

Wow, congratulations!

@nikomatsakis
Copy link
Contributor

/me goes to rebase everything

@eddyb eddyb deleted the safe-ty branch November 19, 2014 10:19
@ghost
Copy link

ghost commented Nov 19, 2014

Amazing. Congratulations, @eddyb. :)

@Gankra
Copy link
Contributor

Gankra commented Nov 19, 2014

🎉 🎈 🎂

lnicola pushed a commit to lnicola/rust that referenced this pull request Dec 11, 2024
…roduce_named_generic

Migrate `introduce_named_generic` Assist to Use `SyntaxFactory`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants