Skip to content

“may not” was incorrectly changed to “must not” in FromResidual documentation #123566

Description

@taylordotfish

Location

Documentation for FromResidual::from_residual

Summary

As part of #87445, the following part of the documentation for FromResidual::from_residual:

/// This should be implemented consistently with the `branch` method such
/// that applying the `?` operator will get back an equivalent residual:
/// `FromResidual::from_residual(r).branch() --> ControlFlow::Break(r)`.
/// (It may not be an *identical* residual when interconversion is involved.)

was changed to (change in bold):

/// This should be implemented consistently with the `branch` method such
/// that applying the `?` operator will get back an equivalent residual:
/// `FromResidual::from_residual(r).branch() --> ControlFlow::Break(r)`.
/// (It must not be an *identical* residual when interconversion is involved.)

The parenthetical now appears to state that the residual is not permitted to be identical when interconversion is involved (i.e., it must be different in some way). However, I believe the intention of the original wording was to convey that the residual is not required to be identical when interconversion is involved, which makes more sense contextually. I believe the emphasis on the word “identical” also supports this interpretation.

I propose that “must not” be changed to “need not”, “is not required to”, “does not have to”, or similar. Even “might not”, the other alternative in #87445, would be closer.

Activity

  1. added
    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and tools
    on Apr 6, 2024
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Apr 6, 2024
  3. added
    T-libs-api[DEPRECATED; DO NOT USE]
    C-bugCategory: This is a bug.
    and removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Apr 6, 2024
  4. taylordotfish commented on Apr 10, 2024

    @taylordotfish
    Author

    It looks like #123595 was created in response to this issue, but doesn't mention or link to it, which is odd considering its description contains verbatim parts of this issue's description without citation.

  5. GrigorenkoPV commented on Jun 19, 2024

    @GrigorenkoPV
    Contributor

    I guess this issue can be closed now that the (impolite) PR got merged?

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-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-bugCategory: This is a bug.T-libs-api[DEPRECATED; DO NOT USE]

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions