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

Rollup of 6 pull requests #69012

Merged
merged 20 commits into from
Feb 10, 2020
Merged

Rollup of 6 pull requests #69012

merged 20 commits into from
Feb 10, 2020

Commits on Feb 9, 2020

  1. Configuration menu
    Copy the full SHA
    0b20ce9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0755c41 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fa5a3c3 View commit details
    Browse the repository at this point in the history
  4. Print after effect in default graphviz formatter

    Now the line for each statement will show the diff resulting from the
    combination of `before_statement_effect` and `statement_effect`. It's
    still possible to observe each in isolation via
    `borrowck_graphviz_format = "two_phase"`.
    ecstatic-morse committed Feb 9, 2020
    Configuration menu
    Copy the full SHA
    effd520 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    852afa2 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fb14386 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    83dfb42 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    8d6208c View commit details
    Browse the repository at this point in the history
  9. parser: Keep current and previous tokens precisely

    including their unnormalized forms.
    Add more documentation for them.
    petrochenkov committed Feb 9, 2020
    Configuration menu
    Copy the full SHA
    cd7a428 View commit details
    Browse the repository at this point in the history
  10. Reduce the number of RefCells in InferCtxt.

    `InferCtxt` contains six structures within `RefCell`s. Every time we
    create and dispose of (commit or rollback) a snapshot we have to
    `borrow_mut` each one of them.
    
    This commit moves the six structures under a single `RefCell`, which
    gives significant speed-ups by reducing the number of `borrow_mut`
    calls. To avoid runtime errors I had to reduce the lifetimes of dynamic
    borrows in a couple of places.
    nnethercote committed Feb 9, 2020
    Configuration menu
    Copy the full SHA
    7426853 View commit details
    Browse the repository at this point in the history
  11. Reduce queries/map lookups done by coherence

    This has negligible perf impact, but it does improve the code a bit.
    
    * Only query the specialization graph of any trait once instead of once per
      impl
    * Loop over impls only once, precomputing impl DefId and TraitRef
    jonas-schievink committed Feb 9, 2020
    Configuration menu
    Copy the full SHA
    5ab1ab4 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    82d6e79 View commit details
    Browse the repository at this point in the history
  13. Defer error span calculation until needed

    This was showing up in profiles. Also deduplicates the code to get just
    the impl header span.
    jonas-schievink committed Feb 9, 2020
    Configuration menu
    Copy the full SHA
    8f468ee View commit details
    Browse the repository at this point in the history
  14. Remove vestigial rust-lang#43355-compat code

    This was previously a future-compat warning that has since been turned into
    hard error, but without actually removing all the code.
    
    Avoids a call to `traits::overlapping_impls`, which is expensive.
    jonas-schievink committed Feb 9, 2020
    Configuration menu
    Copy the full SHA
    2309592 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2020

  1. Rollup merge of rust-lang#68694 - nnethercote:reduce-RefCells-in-Infe…

    …rCtxt, r=varkor
    
    Reduce the number of `RefCell`s in `InferCtxt`.
    
    `InferCtxt` contains six structures within `RefCell`s. Every time we
    create and dispose of (commit or rollback) a snapshot we have to
    `borrow_mut` each one of them.
    
    This commit moves the six structures under a single `RefCell`, which
    gives significant speed-ups by reducing the number of `borrow_mut`
    calls. To avoid runtime errors I had to reduce the lifetimes of dynamic
    borrows in a couple of places.
    
    r? @varkor
    Dylan-DPC authored Feb 10, 2020
    Configuration menu
    Copy the full SHA
    8007f84 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#68966 - jonas-schievink:coherence-perf, r=v…

    …arkor
    
    Improve performance of coherence checks
    
    The biggest perf improvement in here is expected to come from the removal of the remaining rust-lang#43355 warning code since that effectively runs the expensive parts of coherence *twice*, which can even be visualized by obtaining a flamegraph:
    
    ![image](https://user-images.githubusercontent.com/5047365/74091959-e1f41200-4a8b-11ea-969d-2849d3f86c63.png)
    Dylan-DPC authored Feb 10, 2020
    Configuration menu
    Copy the full SHA
    b3cfb97 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#68976 - ecstatic-morse:const-non-zero, r=dt…

    …olnay
    
    Make `num::NonZeroX::new` an unstable `const fn`
    
    cc rust-lang#53718
    
    These require `#[feature(const_if_match)]`, meaning they must remain unstable for the time being.
    Dylan-DPC authored Feb 10, 2020
    Configuration menu
    Copy the full SHA
    e3315f6 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#68992 - matthewjasper:imm-binding-after-at,…

    … r=Centril
    
    Correctly parse `mut a @ b`
    
    r? @Centril
    
    Closes rust-lang#67861
    Closes rust-lang#67926
    Dylan-DPC authored Feb 10, 2020
    Configuration menu
    Copy the full SHA
    64d2d04 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#69005 - ecstatic-morse:unified-dataflow-gra…

    …phviz, r=wesleywiser
    
    Small graphviz improvements for the new dataflow framework
    
    Split out from rust-lang#68241. This prints the correct effect diff for each line (the before-effect and the after-effect) and makes marginal improvements to the graphviz output for the new dataflow framework including using monospaced font and better line breaking. This will only be useful when rust-lang#68241 is merged and the graphviz output changes from this:
    
    ![image](https://user-images.githubusercontent.com/29463364/74107776-5e3c3300-4b28-11ea-9d33-4862228b5e87.png)
    
    to this:
    
    ![image](https://user-images.githubusercontent.com/29463364/74107751-20d7a580-4b28-11ea-99ca-24f749386601.png)
    
    r? @wesleywiser
    Dylan-DPC authored Feb 10, 2020
    Configuration menu
    Copy the full SHA
    a8d4ccf View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#69006 - petrochenkov:prevspan2, r=Centril

    parser: Keep current and previous tokens precisely
    
    ...including their unnormalized forms.
    Add more documentation for them.
    
    Hopefully, this will help to eliminate footguns like rust-lang#68728 (comment).
    
    I'll try to address the FIXMEs in separate PRs during the next week.
    
    r? @Centril
    Dylan-DPC authored Feb 10, 2020
    Configuration menu
    Copy the full SHA
    18c6d39 View commit details
    Browse the repository at this point in the history