-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Implement RFC 3323: restrictions #106074
base: master
Are you sure you want to change the base?
Implement RFC 3323: restrictions #106074
Conversation
r? @eholk (rustbot has picked a reviewer for you, use r? to override) |
This comment was marked as resolved.
This comment was marked as resolved.
Reassigning to T-compiler, as this doesn't need further T-lang review yet. |
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #106256) made this pull request unmergeable. Please resolve the merge conflicts. |
a2b72b7
to
7b21778
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
0f88945
to
c0c8d21
Compare
This comment has been minimized.
This comment has been minimized.
The job Click to see the possible cause of the failure (guessed by this bot)
|
☔ The latest upstream changes (presumably #113777) made this pull request unmergeable. Please resolve the merge conflicts. |
@@ -1,5 +1,5 @@ | |||
Visibility is restricted to a module which isn't an ancestor of the current | |||
item. | |||
Visibility or restriction is restricted to a module which isn't an ancestor of |
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.
Maybe
Visibility or restriction is restricted to a module which isn't an ancestor of | |
Visibility or restriction is limited to a module which isn't an ancestor of |
to avoid repetition?
I'll reassign to author(s) to rebase and address a few comments but tbh I'm not sure about who should have the ball right now. Feel free to request a review with @rustbot author |
When it gets to actual landing it will be better to split this PR into separate PRs for individual sub-features, it's too large right now. |
Agree with @petrochenkov, one of the reasons I'm procrastinating reviewing this (sorry!) is that this PR adds a lot. Maybe an approach closer to what we are doing with the explicit tail calls experiment (a PR per level — one for parsing, one for HIR, ...; maybe a PR "per feature" would make more sense here, I'm not sure) would be a bit easier to manage. |
No worries on the delay — I know it's a large PR. I can definitely split it up into multiple PRs when I get the chance. That may be a little while, unfortunately, as I've got a few different things going on. |
For the record: feel free to follow the new nightly style policy and open a separate formatting PR against rustfmt once this has landed in the compiler. |
@jhpratt any updates on this? |
@Dylan-DPC Not at the moment. I have splitting it up on my personal backlog. |
@jhpratt any updates on this? It's just collecting conflicts at the moment :D |
r? compiler |
I can review this but I'd rather we split it as agreed above (not to seem repetitive, and obviously take your time). |
The update would be that I'm quite busy, unfortunately. Believe me when I say this is something that I still want to happen 😄 Between work, RustConf prep, and other open source things, this isn't happening in the next month. However, I hope to get around to it within the next few months. It'll likely be a series of PRs, each being an incremental step towards the full implementation that this PR is. |
This PR implements RFC 3323, which proposed
impl
andmut
restrictions. Both are implemented here.The current state of the PR is insufficient to merge.mut
restrictions are implemented without any known bugs.impl
restrictions, however, are not currently enforced on external traits — they are only enforced on same-crate traits. I do not know why this is the case, and would appreciate some help in narrowing down what needs to change to fix this. This is the only known issue with the implementation, and is why this PR is currently marked as a draft.Once the bug is fixed, I'll also need to clean up the commit history. The current history is due to having it implemented while the RFC was still in progress.CI will fail for a number of reasons. I still haveTODO
in the code as opposed toFIXME
(because it needs to be done before this gets merged). I haven't added the tracking issue yet. And the bug will also cause a few errors by itself.I am currently refactoring some code and cleaning up the commit history. After that is done, this PR will be ready to merge.cc #105077