-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Proof of Concept: add #[defines]
attribute and require it for all type-alias-impl-trait sites that register a hidden type
#128440
base: master
Are you sure you want to change the base?
Conversation
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #128481) made this pull request unmergeable. Please resolve the merge conflicts. |
Simple paths in attributes are not as bad as rust-lang/rfcs#3659, but still sort of meh, but probably acceptable. We don't currently have any resolved paths (staying after macro expansion) in attributes in the proper language. |
Also, |
…ler-errors Avoid `opaque type not constrained` errors in the presence of other errors pulled out of rust-lang#128440 These errors carry no new information if the opaque type was actually used in a constraining (but erroneous) way somewhere.
Rollup merge of rust-lang#133850 - oli-obk:push-xryukktpyooq, r=compiler-errors Avoid `opaque type not constrained` errors in the presence of other errors pulled out of rust-lang#128440 These errors carry no new information if the opaque type was actually used in a constraining (but erroneous) way somewhere.
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #134492) made this pull request unmergeable. Please resolve the merge conflicts. |
Blocked on #131229 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ng from the signature to the list of opaques that are being defined
statics still need work
The job Click to see the possible cause of the failure (guessed by this bot)
|
☔ The latest upstream changes (presumably #135519) made this pull request unmergeable. Please resolve the merge conflicts. |
This PR is not meant to be merged (I will not be pushing changes in the next 4 months), but serves as a starting point for anyone wanting to make progress on this. It should hopefully be simple to rebase and not require you to edit 200+ tests, as these edits are done here and you can just cherry pick them out (no need for attribution, just squash as you want)
I left TODOs for everything that I think needs to be done.
#[defines()]
), the latter opting out of impl-trait-in-assoc types automatic opaque collection in the signature (or in general, any#[defines(SomeOhterTait)]
attribute behaving as an override for the default collection, too).An interesting follow-up could also be to automatically fill in RPITs into that list in ast lowering, so that
opaque_types_defined_by
doesn't need to walk for RPITs anymore.@petrochenkov can you have a look at the resolver changes so that anyone picking this up will know what to change?