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

Make unrooted_must_root understand promises #22504

Closed
Manishearth opened this issue Dec 19, 2018 · 0 comments
Closed

Make unrooted_must_root understand promises #22504

Manishearth opened this issue Dec 19, 2018 · 0 comments

Comments

@Manishearth
Copy link
Member

@Manishearth Manishearth commented Dec 19, 2018

Currently methods returning an Rc<Promise> need to be marked as allow(unrooted_must_root), because Rc<Promise> is transitively must_root. Almost all the new APIs use promises, which means we opt out of our soundness checks a lot.

Perhaps we can instead use a thin wrapper around Rc<Promise> called RootedPromise, which itself isn't must_root? Or special case the lint for this. I'm hesitant to just go ahead and do it because I don't fully understand the soundness situation for promises.

see also #14900

cc @nox @jdm @asajeffrey

@Manishearth Manishearth mentioned this issue Jan 3, 2019
3 of 6 tasks complete
Manishearth added a commit to Manishearth/servo that referenced this issue Jan 4, 2019
Manishearth added a commit to Manishearth/servo that referenced this issue Jan 4, 2019
bors-servo added a commit that referenced this issue Jan 4, 2019
Make unrooted_must_root ignore Rc<Promise>

fixes #22504

r? @jdm @nox

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22608)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Jan 4, 2019
Make unrooted_must_root ignore Rc<Promise>

fixes #22504

r? @jdm @nox

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22608)
<!-- Reviewable:end -->
gterzian added a commit to gterzian/servo that referenced this issue Jan 30, 2019
aditj added a commit to aditj/servo that referenced this issue Jan 30, 2019
aditj added a commit to aditj/servo that referenced this issue Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

1 participant
You can’t perform that action at this time.