-
Notifications
You must be signed in to change notification settings - Fork 776
[WIP] Generated PhantomData for used type parameters #635
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
Conversation
|
@Kowasaki thanks! This looks great! There are just two things needed before we can merge this:
Thanks again! Looking forward to landing this :) |
Needed latest updates
...and trailing whitespace.
…meters This is a follow up to c8a206a, and the support for blacklisting in the named template parameter usage analysis. This ensures that ever item we ever call `constrain` on has an entry in `used` for the set of template parameters it uses. Additionally, it adds extra assertions to enforce the invariant. We cannot completely avoid analyzing blacklisted items because we want to consider all of a blacklisted template's parameters as used. This is why we ensure that blacklisted items have a used template parameter set rather than ensuring that blacklisted items never end up in the worklist.
|
☔ The latest upstream changes (presumably #640) made this pull request unmergeable. Please resolve the merge conflicts. |
|
@Kowasaki hi! do you need some help rebasing + squashing and resolving conflicts? http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request is a good, quick read on how to rebase + squash a pull request. |
|
A more lengthy guide is here in servo's repository's wiki. |
|
Hey all, Thanks for the guides! I think I am still doing rebasing/squashing wrong though since I can still see all the commits here... it looks like I did squash the commits on my repo but I am not sure what is going on here |
Emit `PhantomData<UnsafeCell<T>>` members for all generic parameters This makes generated generic structs lifetime invariant, since we cannot know the C++ type's true variance. Fixes #506 Rebased + squashed version of #635; cc @Kowasaki To resolve the conflicts and rebase and squash, I did essentially these commands: ``` $ git fetch servo $ git checkout -b Kowasaki-master servo/master $ git merge --squash --edit Kowasaki/master $ cargo test $ cd tests/expectations $ cargo test $ cd - $ git commit --author="Kowasaki" $ git push fitzgen Kowasaki-master ``` Hopefully that is useful for you in the future :) Thanks for fixing this issue!
|
Rebased + squashed in #689 |
The test expectations shows all the generated ::std::marker::PhantomData<::std::cell::UnsafeCell> used type parameters.