Implement RFC 3323: restrictions by jhpratt · Pull Request #106074 · rust-lang/rust (original) (raw)
This PR implements RFC 3323, which proposed impl
and mut
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 have TODO
in the code as opposed to FIXME
(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