-
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
Require a #[defines] attribute for type-alias-impl-trait in order for a function to be able to register hidden types. #110010
Conversation
a function to be able to register hidden types.
Some changes occurred in src/tools/clippy cc @rust-lang/clippy
|
The job Click to see the possible cause of the failure (guessed by this bot)
|
@oli-obk |
Yea, I'm aware. This was the quickest way to do things. It can't work for inner attributes at all and can't work for cfg_attr either. I am exploring actually correct strategies for this, but all of the ones I came up with are just differently colored sheds of making it a builtin attribute macro that expands the item to give it an extra unstable syntax thing. |
☔ The latest upstream changes (presumably #108698) made this pull request unmergeable. Please resolve the merge conflicts. |
…=jackh726 Split out a separate feature gate for impl trait in associated types in rust-lang#107645 it was decided that we'll take a new route for type alias impl trait. The exact route isn't clear yet, so while I'm working on implementing some of these proposed changes (e.g. in rust-lang#110010) to be able to experiment with them, I will also work on stabilizing another sugar version first: impl trait in associated types. Similarly I'll look into creating feature gates for impl trait in const/static types. This PR does nothing but split the feature gate, so that you need to enable a different feature gate for ```rust impl Trait for Type { type Assoc = impl SomeTrait; } ``` than what you need for `type Foo = impl SomeTrait;`
closing in favour of #112652 |
r? @ghost
alternative to #107809
fixes #107645
TODO:
#[defines]
#[cfg_attr(thing, defines(Foo))]
and inner attributes#[defines]
annotations on child modules and other items that can have nested items?