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

const expression can borrow static items #1610

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Commits on Oct 9, 2024

  1. Configuration menu
    Copy the full SHA
    703e3d4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1462eda View commit details
    Browse the repository at this point in the history
  3. possible document about Freeze

    dingxiangfei2009 authored and ehuss committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    0b8ced4 View commit details
    Browse the repository at this point in the history
  4. add error code

    Co-authored-by: Eric Huss <eric@huss.org>
    dingxiangfei2009 and ehuss committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    d8a53df View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9af6601 View commit details
    Browse the repository at this point in the history
  6. Simplify const_refs_to_static

    This removes some content for const_refs_to_static which seems to
    duplicate content elsewhere. In particular:
    
    * Remove the examples of allowed use of `static` in `const_eval.md`. We
      don't show examples for any of the other permitted uses. Additionally,
      I believe the other points in the list already cover concerns such as
      interior mutability (and possibly more precise way, since the existing
      content mentions things like transient places).
    * I think a single statement that reads of `extern` statics is
      sufficient to follow the pattern of all the other allowed behaviors.
    * Removed the examples from the `constant-items.md` chapter about
      allowing use of `static`s. Again, we generally don't duplicate what
      is allowed unless there is some explicit statement indicating that
      it is not. Also, I am reluctant to duplicate what is allowed between
      `const_eval.md` and `constant-items.md`.
    ehuss committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    97abd04 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    68fb8b8 View commit details
    Browse the repository at this point in the history
  8. Clarify wording of the Sync requirement for an immutable static

    Additionally, this drops the statement that all access is "safe" since
    there isn't anything that would imply that it is unsafe.
    ehuss committed Oct 9, 2024
    Configuration menu
    Copy the full SHA
    73de72e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    8b01b71 View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2024

  1. Configuration menu
    Copy the full SHA
    e8c43a6 View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2024

  1. apply suggestions

    dingxiangfei2009 committed Oct 13, 2024
    Configuration menu
    Copy the full SHA
    36c84b0 View commit details
    Browse the repository at this point in the history