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 refined trait implementations #100706

Open
4 tasks
tmandry opened this issue Aug 18, 2022 · 2 comments
Open
4 tasks

Tracking Issue for refined trait implementations #100706

tmandry opened this issue Aug 18, 2022 · 2 comments
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. F-refine `#![feature(refine)]`; RFC #3245 T-lang Relevant to the language team, which will review and decide on the PR/issue.

Comments

@tmandry
Copy link
Member

tmandry commented Aug 18, 2022

This is a tracking issue for the RFC "Refined trait implementations" (rust-lang/rfcs#3245).
The feature gate for the issue is #![feature(refine)].

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 #[refine] be required in future editions? Options:
    • Required
    • Recommended (by a lint that can be disabled on refined impls without a #[refine])
    • Not recommended (refined APIs are available without the attribute)

See the RFC for more information.

Implementation history

@tmandry tmandry added T-lang Relevant to the language team, which will review and decide on the PR/issue. C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. labels Aug 18, 2022
@tmandry tmandry added the F-refine `#![feature(refine)]`; RFC #3245 label Sep 22, 2022
@dhardy
Copy link
Contributor

dhardy commented Oct 31, 2023

I didn't see discussion related to applying #[refine] to associated types (which should arguably be a different topic), so I created one here: https://internals.rust-lang.org/t/refine-applied-to-associated-types/19789

One note worth taking away: it may sometimes be desirable to use #[refine] on the trait, not the impl.

@clarfonthey
Copy link
Contributor

Another interesting case for #[refine] that should definitely be excluded from the initial definition, but is worth considering: refining &mut self to &self. This would help, for example, implementing Extend for concurrency-safe collections without requiring unique borrows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: A tracking issue for an RFC or an unstable feature. F-refine `#![feature(refine)]`; RFC #3245 T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
Status: Rejected/Not lang
Development

No branches or pull requests

3 participants