Skip to content

Tracking issue for RFC 2632 ?const trait bound opt-out #67794

Closed

Description

@ecstatic-morse

This is the tracking issue for the ?const opt-out for trait bounds described in rust-lang/rfcs#2632. The primary tracking issue for that RFC is #67792. The feature gate for it is const_trait_bound_opt_out.

This RFC has not yet been accepted. It is being implemented on a provisional basis to evaluate the potential fallout.

cc #57563

Implementation steps:

Activity

  1. changed the title [-]Tracking issue for RFC 2362, `?const` trait bound opt-out[/-] [+]Tracking issue for RFC 2632 `?const` trait bound opt-out[/+] on Jan 3, 2020
  2. added 3 commits that reference this issue on Jan 7, 2020
  3. added a commit that references this issue on Jan 21, 2020
  4. added a commit that references this issue on Jan 21, 2020
  5. added
    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)
    on Mar 28, 2020
  6. clarfonthey commented on Sep 1, 2021

    @clarfonthey
    Contributor

    From what I understand, this was recently changed to ~const but none of the tilde-const PRs link back to this one, and the issue name/description should be updated?

  7. clarfonthey commented on Sep 1, 2021

    @clarfonthey
    Contributor

    cc @oli-obk @fee1-dead since from what I understand you two know the most about this change

  8. fee1-dead commented on Sep 1, 2021

    @fee1-dead
    Member

    The opt-out is no longer needed. The previous scheme was:

    const fn a<T: /* inferred const bound */ Foo + /* opt-out normal trait bound */ ?const Bar>

    And the current scheme is now:

    const fn a<T: /* normal trait bound */ Foo + /* const bound if called in a const context */ ~const Bar>

    This issue should be closed, but it can be reopened if somehow we decide to use ?const opt-out again.

  9. jplatte commented on Sep 1, 2021

    @jplatte
    Contributor

    So where is ~const tracked then? #67792?

  10. oli-obk commented on Sep 1, 2021

    @oli-obk
    Contributor

    yea, const_trait_impl requires the opt in syntax, otherwise you can't write anything but trivial impls

  11. clarfonthey commented on Sep 1, 2021

    @clarfonthey
    Contributor

    So... is there no dedicated tracking issue for ~const, then?

    Mostly because I don't see any easy place someone can look to know what the new syntax means.

  12. oli-obk commented on Sep 1, 2021

    @oli-obk
    Contributor

    I updated the const_trait_impl tracking issue to link to the latest RFC text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-langRelevant to the language team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions