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

[beta] Rollup backports #56077

Closed
wants to merge 10 commits into from
Closed

Commits on Nov 19, 2018

  1. Add helpful logging statements.

    This commit adds logging statements to `promote_consts` and
    `qualify_consts` to make it easier to understand what it is doing.
    davidtwco authored and pietroalbini committed Nov 19, 2018
    Configuration menu
    Copy the full SHA
    bd27131 View commit details
    Browse the repository at this point in the history
  2. Test for cast causing static promotion failure.

    This commit adds a test that ensures that a cast in a static doesn't
    stop const promotion within the static.
    davidtwco authored and pietroalbini committed Nov 19, 2018
    Configuration menu
    Copy the full SHA
    6c1d718 View commit details
    Browse the repository at this point in the history
  3. Refactor and add PlaceContext::AscribeUserTy.

    This commit refactors `PlaceContext` to split it into four different
    smaller enums based on if the context represents a mutating use,
    non-mutating use, maybe-mutating use or a non-use (this is based on the
    recommendation from @oli-obk on Zulip[1]).
    
    This commit then introduces a `PlaceContext::AscribeUserTy` variant.
    `StatementKind::AscribeUserTy` is now correctly mapped to
    `PlaceContext::AscribeUserTy` instead of `PlaceContext::Validate`.
    `PlaceContext::AscribeUserTy` can also now be correctly categorized as a
    non-use which fixes an issue with constant promotion in statics after a
    cast introduces a `AscribeUserTy` statement.
    
    [1]: https://rust-lang.zulipchat.com/#narrow/stream/122657-wg-nll/subject/.2355288.20cast.20fails.20to.20promote.20to.20'static/near/136536949
    davidtwco authored and pietroalbini committed Nov 19, 2018
    Configuration menu
    Copy the full SHA
    0c3dfe1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8a6f4c8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    410f520 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    84afecc View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0a26e79 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9ab3b0f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4541827 View commit details
    Browse the repository at this point in the history
  10. Increase Duration approximate equal threshold to 1us

    Previously this threshold when testing was 100ns, but the Windows
    documentation states:
    
    > which is a high resolution (<1us) time stamp
    
    which presumably means that we could have up to 1us resolution, which
    means that 100ns doesn't capture "equivalent" time intervals due to
    various bits of rounding here and there.
    
    It's hoped that this..
    
    Closes rust-lang#56034
    alexcrichton authored and pietroalbini committed Nov 19, 2018
    Configuration menu
    Copy the full SHA
    1d1213f View commit details
    Browse the repository at this point in the history