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

Tracking Issue for cfg_attribute_in_where #115590

Open
4 tasks
pnkfelix opened this issue Sep 6, 2023 · 3 comments
Open
4 tasks

Tracking Issue for cfg_attribute_in_where #115590

pnkfelix opened this issue Sep 6, 2023 · 3 comments
Labels
B-RFC-approved Blocker: Approved by a merged RFC but not yet implemented. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC S-tracking-unimplemented Status: The feature has not been implemented. T-lang Relevant to the language team, which will review and decide on the PR/issue.

Comments

@pnkfelix
Copy link
Member

pnkfelix commented Sep 6, 2023

This is a tracking issue for the RFC "Allow cfg-attributes in where clauses" (rust-lang/rfcs#3399).
The feature gate for the issue is #![feature(cfg_attribute_in_where)].

The intent, as described in the Guide-level explanation, is to enable cfg-attributes on where-clauses, like so:

impl<T> SomeTrait<T> for Thing
where
    #[cfg(something_a)] T: SomeRequirementA,
    #[cfg(something_b)] T: SomeRequirementB,
{}

About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

Steps

Unresolved Questions

  • should cfg-attributes be allowed to decorate individual bounds on the right hand side of the colon?
  • rustfmt is supposed to be able to format the where clause somehow, do we expect it to (try to) put the attribute on the same line, or would it always prefer the attribute on separate lines?

Implementation history

@pnkfelix pnkfelix added T-lang Relevant to the language team, which will review and decide on the PR/issue. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC labels Sep 6, 2023
@pnkfelix pnkfelix changed the title Tracking Issue for XXX Tracking Issue for cfg_attribute_in_where Sep 6, 2023
@mj10021
Copy link
Contributor

mj10021 commented Sep 8, 2023

Is anyone working on this or is any help needed?

@recatek
Copy link

recatek commented Sep 21, 2023

Help would certainly be welcome!

@mj10021
Copy link
Contributor

mj10021 commented Oct 13, 2023

Oh, great, I can start working on this very soon (sorry for the delayed reply btw). I'm assuming I should just ask on Zulip if I get stuck on anything?

@fmease fmease added S-tracking-unimplemented Status: The feature has not been implemented. B-RFC-approved Blocker: Approved by a merged RFC but not yet implemented. labels Feb 28, 2024
bors added a commit to rust-lang-ci/rust that referenced this issue Nov 22, 2024
…=<try>

Refactor `where` predicates, and reserve for attributes support

Refactor `WherePredicate` to `WherePredicateKind`, and reserve for attributes support in `where` predicates.

This is a part of rust-lang#115590 and is split from rust-lang#132388.

r? petrochenkov
bors added a commit to rust-lang-ci/rust that referenced this issue Nov 26, 2024
…=cjgillot

Refactor `where` predicates, and reserve for attributes support

Refactor `WherePredicate` to `WherePredicateKind`, and reserve for attributes support in `where` predicates.

This is a part of rust-lang#115590 and is split from rust-lang#132388.

r? petrochenkov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-RFC-approved Blocker: Approved by a merged RFC but not yet implemented. C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC S-tracking-unimplemented Status: The feature has not been implemented. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants