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 8 pull requests #81593

Closed
wants to merge 32 commits into from
Closed

Rollup of 8 pull requests #81593

wants to merge 32 commits into from

Commits on Jan 22, 2021

  1. Don't link with --export-dynamic on wasm32-wasi

    Remove --export-dynamic from the link arguments on the wasm32-wasi
    target, as it emits spurious exports and increases code size.
    
    Leave it in place for wasm32-unknown-unknown and
    wasm32-unknown-emscripten. Even though it isn't a great solution
    there, users are likely depending on its behavior there.
    sunfishcode committed Jan 22, 2021
    Configuration menu
    Copy the full SHA
    9abcfa5 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2021

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

Commits on Jan 27, 2021

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

Commits on Jan 29, 2021

  1. Configuration menu
    Copy the full SHA
    d1727ed View commit details
    Browse the repository at this point in the history
  2. Process mentioned upvars for analysis first pass after ExprUseVisitor

    - This allows us add fake information after handling migrations if
      needed.
    - Capture analysis also priortizes what we see earlier, which means
      fake information should go in last.
    arora-aman committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    2c651eb View commit details
    Browse the repository at this point in the history
  3. Migrations first pass

    arora-aman committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    36352d2 View commit details
    Browse the repository at this point in the history
  4. Tests for 2229 lint

    arora-aman committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    d30a5bf View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9ac023d View commit details
    Browse the repository at this point in the history
  6. PR fixup

    arora-aman committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    f106e18 View commit details
    Browse the repository at this point in the history
  7. New migration

    arora-aman committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    11abaa1 View commit details
    Browse the repository at this point in the history
  8. Restrict precision of captures with capture_disjoint_fields set

    - No Derefs in move closure, this will result in value behind a reference getting moved.
    - No projections are applied to raw pointers, since these require unsafe blocks. We capture
      them completely.
    
    Motivations for these are recorded here: https://hackmd.io/71qq-IOpTNqzMkPpAI1dVg?view
    arora-aman committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    b421cd5 View commit details
    Browse the repository at this point in the history
  9. Compute mutability of closure captures

    When `capture_disjoint_fields` is not enabled, checking if the root variable
    binding is mutable would suffice.
    
    However with the feature enabled, the captured place might be mutable
    because it dereferences a mutable reference.
    
    This PR computes the mutability of each capture after capture analysis
    in rustc_typeck. We store this in `ty::CapturedPlace` and then use
    `ty::CapturedPlace::mutability` in mir_build and borrow_check.
    arora-aman committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    3488082 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    1373f98 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    0897db5 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    604cbdc View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    c748f32 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    ffd5327 View commit details
    Browse the repository at this point in the history
  15. Fix typos

    arora-aman committed Jan 29, 2021
    Configuration menu
    Copy the full SHA
    fadf03e View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    0f4bab2 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2021

  1. Configuration menu
    Copy the full SHA
    5a3b85c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9946b54 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6946534 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2021

  1. Fix small typo

    Seppel3210 committed Jan 31, 2021
    Configuration menu
    Copy the full SHA
    6695690 View commit details
    Browse the repository at this point in the history
  2. stabilize int_bits_const

    KodrAus committed Jan 31, 2021
    Configuration menu
    Copy the full SHA
    8940a26 View commit details
    Browse the repository at this point in the history
  3. Rollup merge of #80092 - sexxi-goose:restrict_precision, r=nikomatsakis

    2229: Fix issues with move closures and mutability
    
    This PR fixes two issues when feature `capture_disjoint_fields` is used.
    
    1. Can't mutate using a mutable reference
    2. Move closures try to move value out through a reference.
    
    To do so, we
    1. Compute the mutability of the capture and store it as part of the `CapturedPlace`  that is written in TypeckResults
    2. Restrict capture precision. Note this is temporary for now, to allow the feature to be used with move closures and ByValue captures and might change depending on discussions with the lang team.
        - No Derefs are captured for ByValue captures, since that will result in value behind a reference getting moved.
        - No projections are applied to raw pointers since these require unsafe blocks. We capture
        them completely.
    
    r? ```@nikomatsakis```
    jonas-schievink authored Jan 31, 2021
    Configuration menu
    Copy the full SHA
    cd9a250 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of #80404 - JulianKnodt:arr_ref, r=oli-obk

    Remove const_in_array_repeat
    
    Fixes #80371. Fixes #81315. Fixes #80767. Fixes #75682.
    
    I thought there might be some issue with `Repeats(_, 0)`, but if you increase the items in the array it still ICEs. I'm not sure if this is the best fix but it does fix the given issue.
    jonas-schievink authored Jan 31, 2021
    Configuration menu
    Copy the full SHA
    0155051 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of #80629 - sexxi-goose:migrations_1, r=nikomatsakis

    Add lint for 2229 migrations
    
    Implements the first for RFC 2229 where we make the decision to migrate a root variable based on if the type of the variable needs Drop and if the root variable would be moved into the closure when the feature isn't enabled.
    
    r? `@nikomatsakis`
    jonas-schievink authored Jan 31, 2021
    Configuration menu
    Copy the full SHA
    61ab140 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of #81255 - sunfishcode:wasi-no-export-dynamic, r=alexcr…

    …ichton
    
    Don't link with --export-dynamic on wasm32-wasi
    
    Remove --export-dynamic from the link arguments on the wasm32-wasi
    target, as it emits spurious exports and increases code size.
    
    Leave it in place for wasm32-unknown-unknown and
    wasm32-unknown-emscripten. Even though it isn't a great solution
    there, users are likely depending on its behavior there.
    jonas-schievink authored Jan 31, 2021
    Configuration menu
    Copy the full SHA
    666d2ad View commit details
    Browse the repository at this point in the history
  7. Rollup merge of #81351 - lcnr:big-money-big-prices, r=oli-obk

    combine: stop eagerly evaluating consts
    
    `super_relate_consts` eagerly evaluates constants which doesn't seem too great.
    
    I now also finally understand why all of the unused substs test passed. The reason being
    that we just evaluated the constants in `super_relate_consts` 😆
    
    While this change isn't strictly necessary as evaluating consts here doesn't hurt, it still feels a lot cleaner to do it this way
    
    r? ``@oli-obk`` ``@nikomatsakis``
    jonas-schievink authored Jan 31, 2021
    Configuration menu
    Copy the full SHA
    9fc2952 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of #81480 - b-naber:nested_fields_suggestion, r=estebank

    Add suggestion for nested fields
    
    Closes #81220
    
    r? `@estebank`
    jonas-schievink authored Jan 31, 2021
    Configuration menu
    Copy the full SHA
    6443825 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of #81589 - Seppel3210:master, r=jonas-schievink

    Fix small typo in string.rs
    jonas-schievink authored Jan 31, 2021
    Configuration menu
    Copy the full SHA
    2b9fec7 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of #81590 - KodrAus:stabilize/int_bits_const, r=m-ou-se

    Stabilize int_bits_const
    
    Closes #76904
    
    The FCP to stabilize the `int_bits_const` feature completed on the tracking issue.
    jonas-schievink authored Jan 31, 2021
    Configuration menu
    Copy the full SHA
    bd990cc View commit details
    Browse the repository at this point in the history