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 5 pull requests #73340

Closed
wants to merge 26 commits into from

Commits on Jun 7, 2020

  1. Configuration menu
    Copy the full SHA
    95c4899 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9c8f881 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2020

  1. Simply use drop instead of std::mem::drop

    Co-authored-by: LeSeulArtichaut <leseulartichaut@gmail.com>
    poliorcetics and LeSeulArtichaut authored Jun 8, 2020
    Configuration menu
    Copy the full SHA
    fdef1a5 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2020

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

Commits on Jun 10, 2020

  1. Configuration menu
    Copy the full SHA
    c29b3fa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7cde07e View commit details
    Browse the repository at this point in the history
  3. fix rebase

    estebank committed Jun 10, 2020
    Configuration menu
    Copy the full SHA
    03552ec View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2020

  1. Revert heterogeneous SocketAddr PartialEq impls

    These lead to inference regressions (mostly in tests) in code that looks
    like:
    
        let socket = std::net::SocketAddrV4::new(std::net::Ipv4Addr::new(127, 0, 0, 1), 8080);
        assert_eq!(socket, "127.0.0.1:8080".parse().unwrap());
    
    That compiles as of stable 1.44.0 but fails in beta with:
    
        error[E0284]: type annotations needed
         --> src/main.rs:3:41
          |
        3 |     assert_eq!(socket, "127.0.0.1:8080".parse().unwrap());
          |                                         ^^^^^ cannot infer type for type parameter `F` declared on the associated function `parse`
          |
          = note: cannot satisfy `<_ as std::str::FromStr>::Err == _`
        help: consider specifying the type argument in the method call
          |
        3 |     assert_eq!(socket, "127.0.0.1:8080".parse::<F>().unwrap());
          |
    dtolnay committed Jun 13, 2020
    Configuration menu
    Copy the full SHA
    c45231c View commit details
    Browse the repository at this point in the history
  2. lint: normalize projections using opaque types

    This commit normalizes projections which contain opaque types (opaque types
    are otherwise linted against, which is would have previously made the
    test cases added in this commit fail).
    
    Signed-off-by: David Wood <david@davidtw.co>
    davidtwco committed Jun 13, 2020
    Configuration menu
    Copy the full SHA
    4ff1678 View commit details
    Browse the repository at this point in the history
  3. Apply suggestions from code review

    Co-authored-by: David Tolnay <dtolnay@gmail.com>
    poliorcetics and dtolnay authored Jun 13, 2020
    Configuration menu
    Copy the full SHA
    f747073 View commit details
    Browse the repository at this point in the history
  4. Clarify the scope-related explanation

    Based on the review made by dtolnay.
    poliorcetics authored Jun 13, 2020
    Configuration menu
    Copy the full SHA
    34b3ff0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c010e71 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    204c236 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    cecfa43 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d73674e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a77f046 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    f5370fa View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a43e486 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    21ddf4d View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    9e2ee32 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    2dcf7db View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2020

  1. Rollup merge of rust-lang#71824 - ecstatic-morse:const-check-post-dro…

    …p-elab, r=oli-obk
    
    Check for live drops in constants after drop elaboration
    
    Resolves rust-lang#66753.
    
    This PR splits the MIR "optimization" pass series in two and introduces a query–`mir_drops_elaborated_and_const_checked`–that holds the result of the `post_borrowck_cleanup` analyses and checks for live drops. This query is invoked in `rustc_interface` for all items requiring const-checking, which means we now do `post_borrowck_cleanup` for items even if they are unused in the crate.
    
    As a result, we are now more precise about when drops are live. This is because drop elaboration can e.g. eliminate drops of a local when all its fields are moved from. This does not mean we are doing value-based analysis on move paths, however; Storing a `Some(CustomDropImpl)` into a field of a local will still set the qualifs for that entire local.
    
    r? @oli-obk
    Dylan-DPC authored Jun 14, 2020
    Configuration menu
    Copy the full SHA
    1fd1d45 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#72740 - estebank:recursive-indirection, r=m…

    …atthewjasper
    
    On recursive ADT, provide indirection structured suggestion
    Dylan-DPC authored Jun 14, 2020
    Configuration menu
    Copy the full SHA
    f8b99dd View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#73104 - poliorcetics:explicit-mutex-drop-ex…

    …ample, r=dtolnay
    
    Example about explicit mutex dropping
    
    Fixes rust-lang#67457.
    
    Following the remarks made in rust-lang#73074, I added an example on the main `Mutex` type, with a situation where there is mutable data and a computation result.
    
    In my testing it is effectively needed to explicitly drop the lock, else it deadlocks.
    
    r? @dtolnay because you were the one to review the previous PR.
    Dylan-DPC authored Jun 14, 2020
    Configuration menu
    Copy the full SHA
    e1d05a9 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#73287 - davidtwco:issue-73251-opaque-types-…

    …in-projections, r=estebank
    
    lint: normalize projections using opaque types
    
    Fixes rust-lang#73251.
    
    This PR normalizes projections which use opaque types (opaque types are otherwise linted against, which is would have previously made the test cases added in this PR fail).
    Dylan-DPC authored Jun 14, 2020
    Configuration menu
    Copy the full SHA
    30fc113 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#73304 - dtolnay:socketeq, r=Mark-Simulacrum

    Revert heterogeneous SocketAddr PartialEq impls
    
    Originally added in rust-lang#72239.
    
    These lead to inference regressions (mostly in tests) in code that looks like:
    
    ```rust
    let socket = SocketAddrV4::new(Ipv4Addr::new(127, 0, 0, 1), 8080);
    assert_eq!(socket, "127.0.0.1:8080".parse().unwrap());
    ```
    
    That compiles as of stable 1.44.0 but fails in beta with:
    
    ```console
    error[E0284]: type annotations needed
     --> src/main.rs:3:41
      |
    3 |     assert_eq!(socket, "127.0.0.1:8080".parse().unwrap());
      |                                         ^^^^^ cannot infer type for type parameter `F` declared on the associated function `parse`
      |
      = note: cannot satisfy `<_ as std::str::FromStr>::Err == _`
    help: consider specifying the type argument in the method call
      |
    3 |     assert_eq!(socket, "127.0.0.1:8080".parse::<F>().unwrap());
      |
    ```
    
    Closes rust-lang#73242.
    Dylan-DPC authored Jun 14, 2020
    Configuration menu
    Copy the full SHA
    6b54f86 View commit details
    Browse the repository at this point in the history