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

Improve associated constant item CTFE timing section #1147

Merged
merged 3 commits into from
Feb 8, 2022

Commits on Jan 27, 2022

  1. Don't implicitly talk about free constant CTFE timing

    @RalfJung pointed out in a [comment] that the previous phrasing of the
    sentence can read like it is giving guarantees about free constant
    definitions always undergoing CTFE, even when unused. That seems to be
    how the compiler behaves right now, but it's unclear whether it's
    intentional.
    
    Be more precise and don't talk about free constants at all.
    
    [comment]: rust-lang#1120 (comment)
    XrXr committed Jan 27, 2022
    Configuration menu
    Copy the full SHA
    cf06f4a View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2022

  1. Configuration menu
    Copy the full SHA
    d0b33a2 View commit details
    Browse the repository at this point in the history
  2. Use generics in associated const CTFE timing example

    This makes the example a bit bigger, but makes the reason why constants don't
    immediately undergo CTFE more conspicuous. When there is computation in the
    definition that use generic parameters, there is not enough information to
    fully evaluate the definition eagerly.
    
    I made it a `compile_fail` example so the run button on the page gives reader
    useful outputs.
    XrXr committed Feb 5, 2022
    Configuration menu
    Copy the full SHA
    37e3c15 View commit details
    Browse the repository at this point in the history