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

Add a HIR pass to check consts for if, loop, etc. #66170

Merged
merged 14 commits into from
Nov 13, 2019

Commits on Nov 13, 2019

  1. Configuration menu
    Copy the full SHA
    8b7d2bc View commit details
    Browse the repository at this point in the history
  2. Get FnSig by HirId

    ecstatic-morse committed Nov 13, 2019
    Configuration menu
    Copy the full SHA
    33b62be View commit details
    Browse the repository at this point in the history
  3. Add HIR pass to check for ifs and loops in a const

    These high-level constructs get mapped to control-flow primitives by the
    time the MIR const-checker runs, making it hard to get the span for the
    erroneous expression.
    ecstatic-morse committed Nov 13, 2019
    Configuration menu
    Copy the full SHA
    3a84efd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    267733b View commit details
    Browse the repository at this point in the history
  5. Remove if/loop tests from min_const_fn

    These errors will be triggered before the MIR const-checker runs,
    causing all other errors to be silenced. They are now checked in the
    `const-{if,loop}` tests.
    ecstatic-morse committed Nov 13, 2019
    Configuration menu
    Copy the full SHA
    92386e8 View commit details
    Browse the repository at this point in the history
  6. Extend const-loop and const-if to handle more cases

    This makes sure that our HIR visitor is visiting as many
    const-items as possible.
    ecstatic-morse committed Nov 13, 2019
    Configuration menu
    Copy the full SHA
    67336bb View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3ce8ca4 View commit details
    Browse the repository at this point in the history
  8. Bless back-compat breakages

    This PR BREAKS CODE THAT WAS ACCEPTED ON STABLE. It's arguably a bug
    that this was accepted in the first place, but here we are. See rust-lang#62272
    for more info.
    ecstatic-morse committed Nov 13, 2019
    Configuration menu
    Copy the full SHA
    281e898 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    eff83e5 View commit details
    Browse the repository at this point in the history
  10. Fix broken doc-test

    ecstatic-morse committed Nov 13, 2019
    Configuration menu
    Copy the full SHA
    0123cbd View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    70aa781 View commit details
    Browse the repository at this point in the history
  12. Bless less verbose error messages

    The MIR const-checker errors for if/match/loop are now delay span bugs,
    so nothing will be emitted unless the HIR checker misses something.
    ecstatic-morse committed Nov 13, 2019
    Configuration menu
    Copy the full SHA
    86734b1 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    5e048da View commit details
    Browse the repository at this point in the history
  14. Use ast::Mutability

    ecstatic-morse committed Nov 13, 2019
    Configuration menu
    Copy the full SHA
    7552bd6 View commit details
    Browse the repository at this point in the history