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 #101311

Closed
wants to merge 27 commits into from
Closed

Commits on Jul 27, 2022

  1. don't ICE when normalizing closure input tys

    `normalize_and_add_constraints` doesn't add entries in `universe_causes`
    when creating new universes, causing an ICE. Remove it!
    
    Add spans to track normalization constraints.
    
    Fix couple places where `universe_causes` is not updated correctly to
    track newly added universes.
    aliemjay committed Jul 27, 2022
    Configuration menu
    Copy the full SHA
    4eae7a1 View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2022

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

Commits on Aug 23, 2022

  1. Support eager and lazy methods for providing references and values

    There are times where computing a value may be cheap, or where
    computing a reference may be expensive, so this fills out the
    possibilities.
    shepmaster committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    38de102 View commit details
    Browse the repository at this point in the history
  2. Add `Provider::{would_be_satisfied_by_value_of,would_be_satisfied_by_…

    …ref_of}`
    
    While the `provide_*` methods already short-circuit when a value has
    been provided, there are times where an expensive computation is
    needed to determine if the `provide_*` method can even be called.
    shepmaster committed Aug 23, 2022
    Configuration menu
    Copy the full SHA
    260ec93 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2022

  1. Try normalizing types without RevealAll in ParamEnv in mir validation

    Before, the MIR validator used RevealAll in its ParamEnv for type
    checking. This could cause false negatives in some cases due to
    RevealAll ParamEnvs not always use all predicates as expected here.
    
    Since some MIR passes like inlining use RevealAll as well, keep using
    it in the MIR validator too, but when it fails usign RevealAll, also
    try the check without it, to stop false negatives.
    Noratrieb committed Aug 29, 2022
    Configuration menu
    Copy the full SHA
    81a583c View commit details
    Browse the repository at this point in the history
  2. Only normalize once in mir validator typechecker

    Before, it called `normalize_erasing_regions` twice since
    `equal_up_to_regions` called it as well for both types.
    Noratrieb committed Aug 29, 2022
    Configuration menu
    Copy the full SHA
    96d4137 View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2022

  1. [drop tracking] Use parent expression for scope

    Previously we were just using the parent node as the scope for a
    temporary value, but it turns out this is too narrow. For example, in
    an expression like
    
        Foo {
            b: &42,
            a: async { 0 }.await,
        }
    
    the scope for the &42 was set to the ExprField node for `b: &42`, when
    we actually want to use the Foo struct expression.
    
    We fix this by recursively searching through parent nodes until we find
    a Node::Expr. It may be that we don't find one, and if so that's okay,
    we will just fall back on the enclosing temporary scope which is always
    sufficient.
    eholk committed Aug 30, 2022
    Configuration menu
    Copy the full SHA
    b9d3f65 View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2022

  1. access_levels.rs refactor

    Bryanskiy committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    1080467 View commit details
    Browse the repository at this point in the history
  2. add TestReachabilityVisitor

    Bryanskiy committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    0111fb0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    54645e8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3ed9310 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f7e462a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    32e1823 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    bd8e312 View commit details
    Browse the repository at this point in the history
  8. port of locator.rs to SessionDiagnostics, fix some of the errors

    revealed by tests, manually add a panic to test for dead code
    CleanCut committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    d0ba1fb View commit details
    Browse the repository at this point in the history
  9. respond to review feedback: mainly eliminate as many conversions as p…

    …ossible...
    
    - ... when creating diagnostics in rustc_metadata
    -  use the error_code! macro
    - pass macro output to diag.code()
    - use fluent from within manual implementation of SessionDiagnostic
    - emit the untested errors in case they occur in the wild
    - stop panicking in the probably-not-dead code, add fixme to write test
    CleanCut committed Aug 31, 2022
    Configuration menu
    Copy the full SHA
    0d65819 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    30adfd6 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    f921f56 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2022

  1. Simplify MIR opt tests

    This commit removes many cases of MIR opt tests emitting `.diff`s for more than one pass. These
    tests cannot be `unit-test`s, and so they are easy to break, and they also provide little value due
    to having excessively strong opinions over *how* a piece of code should be optimized.
    
    Where reasonable, we instead add separate test files that only emit the `PreCodegen.after` MIR for
    code where we want to track what the result of the net result of the optimization pipeline's output
    is.
    JakobDegen committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    e5d60af View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#99583 - shepmaster:provider-plus-plus, r=yaahc

    Add additional methods to the Demand type
    
    This adds on to the original tracking issue rust-lang#96024
    
    r? `@yaahc`
    Dylan-DPC authored Sep 2, 2022
    Configuration menu
    Copy the full SHA
    c20fe7c View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#99818 - aliemjay:fix-closure-normalize, r=e…

    …stebank
    
    don't ICE when normalizing closure input tys
    
    We were ICEing while rendering diagnostics because `universe_causes` is expected to track every universe created in the typeck's infcx.
    
    `normalize_and_add_constraints` doesn't update `universe_causes`
    when creating new universes, causing an ICE. Remove it!
    
    Add spans to better track normalization constraints.
    
    Fix couple places where `universe_causes` is not updated correctly to
    track newly added universes.
    
    Fixes rust-lang#99665
    Dylan-DPC authored Sep 2, 2022
    Configuration menu
    Copy the full SHA
    5596314 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#100121 - Nilstrieb:mir-validator-param-env,…

    … r=oli-obk
    
    Try normalizing types without RevealAll in ParamEnv in MIR validation
    
    Before, the MIR validator used RevealAll in its ParamEnv for type
    checking. This could cause false negatives in some cases due to
    RevealAll ParamEnvs not always use all predicates as expected here.
    
    Since some MIR passes like inlining use RevealAll as well, keep using
    it in the MIR validator too, but when it fails usign RevealAll, also
    try the check without it, to stop false negatives.
    
    Fixes rust-lang#99866
    
    cc `@compiler-errors` who nicely helped me on zulip
    Dylan-DPC authored Sep 2, 2022
    Configuration menu
    Copy the full SHA
    83d2870 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#100147 - Bryanskiy:private-in-public, r=pet…

    …rochenkov
    
    optimization of access level table construction
    
    Refactoring which was mentioned in rust-lang#87487
    Dylan-DPC authored Sep 2, 2022
    Configuration menu
    Copy the full SHA
    b39d4c6 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#100200 - petrochenkov:zgccld2, r=lqd,Mark-S…

    …imulacrum
    
    Change implementation of `-Z gcc-ld` and `lld-wrapper` again
    
    This PR partially reverts rust-lang#97375 and uses the strategy described in rust-lang#97402 (comment) instead, thus fixes rust-lang#97755.
    Dylan-DPC authored Sep 2, 2022
    Configuration menu
    Copy the full SHA
    c772bbf View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#100827 - JakobDegen:better-tests, r=wesleyw…

    …iser
    
    Simplify MIR opt tests
    
    This commit removes many cases of MIR opt tests emitting `.diff`s for more than one pass. These tests cannot be `unit-test`s, and so they are easy to break, and they also provide little value due to having excessively strong opinions over *how* a piece of code should be optimized.
    
    Where reasonable, we instead add separate test files that only emit the `PreCodegen.after` MIR for code where we want to track what the end to end effect of the optimization pipeline on the example code is.
    
    r? `@wesleywiser`
    Dylan-DPC authored Sep 2, 2022
    Configuration menu
    Copy the full SHA
    499cadd View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#100928 - CleanCut:rustc_metadata_diagnostic…

    …s, r=davidtwco
    
    Migrate rustc_metadata to SessionDiagnostics
    
    Migrate rustc_metadata to SessionDiagnostics.
    
    Part of rust-lang#100717
    Dylan-DPC authored Sep 2, 2022
    Configuration menu
    Copy the full SHA
    f0bbb83 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#101217 - eholk:drop-tracking-73137, r=jyn514

    [drop tracking] Use parent expression for scope, not parent node
    
    Previously we were just using the parent node as the scope for a temporary value, but it turns out this is too narrow. For example, in an expression like
    
        Foo {
            b: &42,
            a: async { 0 }.await,
        }
    
    the scope for the &42 was set to the ExprField node for `b: &42`, when we actually want to use the Foo struct expression.
    
    We fix this by recursively searching through parent nodes until we find a Node::Expr. It may be that we don't find one, and if so that's okay, we will just fall back on the enclosing temporary scope which is always sufficient.
    
    Helps with rust-lang#97331
    
    r? `@jyn514`
    Dylan-DPC authored Sep 2, 2022
    Configuration menu
    Copy the full SHA
    96a3cac View commit details
    Browse the repository at this point in the history