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

Closed
wants to merge 65 commits into from
Closed

Commits on May 11, 2020

  1. borrowck DefId -> LocalDefId

    lcnr committed May 11, 2020
    Configuration menu
    Copy the full SHA
    3f661d2 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2020

  1. Configuration menu
    Copy the full SHA
    eccaa01 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    96a466c View commit details
    Browse the repository at this point in the history

Commits on May 21, 2020

  1. Various minor improvements to Ipv6Addr::Display

    - Defer to Ipv4Addr::fmt when printing an Ipv4 address
    - Fast path: write directly to f without an intermediary buffer when
      there are no alignment options
    - Simplify finding the inner zeroes-span
    Lucretiel committed May 21, 2020
    Configuration menu
    Copy the full SHA
    44ca3da View commit details
    Browse the repository at this point in the history

Commits on May 24, 2020

  1. Configuration menu
    Copy the full SHA
    58fdc43 View commit details
    Browse the repository at this point in the history
  2. Formatted correctly

    westernmagic committed May 24, 2020
    Configuration menu
    Copy the full SHA
    d77f73e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    baa801a View commit details
    Browse the repository at this point in the history
  4. Deduplicated macro code

    westernmagic committed May 24, 2020
    Configuration menu
    Copy the full SHA
    1070f08 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6d74e09 View commit details
    Browse the repository at this point in the history
  6. Fixed tests

    westernmagic committed May 24, 2020
    Configuration menu
    Copy the full SHA
    5ec6b5e View commit details
    Browse the repository at this point in the history
  7. Updated documentation

    westernmagic committed May 24, 2020
    Configuration menu
    Copy the full SHA
    ed559b3 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    70cd375 View commit details
    Browse the repository at this point in the history
  9. Update src/doc/unstable-book/src/library-features/asm.md

    Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
    westernmagic and Amanieu committed May 24, 2020
    Configuration menu
    Copy the full SHA
    83a5cdf View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    e18054d View commit details
    Browse the repository at this point in the history

Commits on May 25, 2020

  1. Configuration menu
    Copy the full SHA
    0f18203 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5a3971c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f8f8033 View commit details
    Browse the repository at this point in the history
  4. Format and more tracing

    RalfJung committed May 25, 2020
    Configuration menu
    Copy the full SHA
    d94923e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    64fbe2f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ad7179d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    95b853c View commit details
    Browse the repository at this point in the history
  8. librustc_mir: Add support for const fn offset/arith_offset

    Miri's pointer_offset_inbounds implementation has been moved into
    librustc_mir as ptr_offset_inbounds (to avoid breaking miri on a
    nightly update). The comments have been slightly reworked to better
    match `offset`'s external documentation about what causes UB.
    
    The intrinsic implementations are taken directly from miri.
    
    Signed-off-by: Joe Richey <joerichey@google.com>
    josephlr committed May 25, 2020
    Configuration menu
    Copy the full SHA
    08df311 View commit details
    Browse the repository at this point in the history
  9. core: Make pointer offset methods "const fn"

    Signed-off-by: Joe Richey <joerichey@google.com>
    josephlr committed May 25, 2020
    Configuration menu
    Copy the full SHA
    9b3dfd8 View commit details
    Browse the repository at this point in the history
  10. test/ui/consts: Add tests for const ptr offsets

    Signed-off-by: Joe Richey <joerichey@google.com>
    josephlr committed May 25, 2020
    Configuration menu
    Copy the full SHA
    88a37a2 View commit details
    Browse the repository at this point in the history
  11. miri_unleached: We now allow offset in const fn

    Signed-off-by: Joe Richey <joerichey@google.com>
    josephlr committed May 25, 2020
    Configuration menu
    Copy the full SHA
    6b20f58 View commit details
    Browse the repository at this point in the history
  12. librustc_mir: Add back use statement

    Signed-off-by: Joe Richey <joerichey@google.com>
    josephlr committed May 25, 2020
    Configuration menu
    Copy the full SHA
    55577b4 View commit details
    Browse the repository at this point in the history

Commits on May 26, 2020

  1. librustc_middle: Add function for computing unsigned abs

    This is tricky to get right if we want to avoid panicking or wrapping.
    
    Signed-off-by: Joe Richey <joerichey@google.com>
    josephlr committed May 26, 2020
    Configuration menu
    Copy the full SHA
    6367b54 View commit details
    Browse the repository at this point in the history
  2. Add checks and tests for computing abs(offset_bytes)

    The previous code paniced if offset_bytes == i64::MIN. This commit:
      - Properly computes the absoulte value to avoid this panic
      - Adds a test for this edge case
    
    Signed-off-by: Joe Richey <joerichey@google.com>
    josephlr committed May 26, 2020
    Configuration menu
    Copy the full SHA
    71ef841 View commit details
    Browse the repository at this point in the history

Commits on May 27, 2020

  1. Implement RFC 2585

    LeSeulArtichaut committed May 27, 2020
    Configuration menu
    Copy the full SHA
    a977df3 View commit details
    Browse the repository at this point in the history
  2. Add tests

    LeSeulArtichaut committed May 27, 2020
    Configuration menu
    Copy the full SHA
    594c499 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bb67915 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3ce9d5c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b3e012b View commit details
    Browse the repository at this point in the history
  6. Use the lowest of unsafe_op_in_unsafe_fn and safe_borrow_packed f…

    …or packed borrows in unsafe fns
    LeSeulArtichaut committed May 27, 2020
    Configuration menu
    Copy the full SHA
    a41f763 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a3bae5c View commit details
    Browse the repository at this point in the history
  8. Fix and bless tests

    LeSeulArtichaut committed May 27, 2020
    Configuration menu
    Copy the full SHA
    925d5ac View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    9671b44 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    3599ada View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    4a538d3 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    e3d27ec View commit details
    Browse the repository at this point in the history
  13. Fix import

    LeSeulArtichaut committed May 27, 2020
    Configuration menu
    Copy the full SHA
    1b08850 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    63066c0 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    db684be View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    3fea832 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    5ba2220 View commit details
    Browse the repository at this point in the history
  18. Tweak output for mismatched impl item

    Detect type parameter that might require lifetime constraint.
    Do not name `ReVar`s in expected/found output.
    Reword text suggesting to check the lifetimes.
    estebank committed May 27, 2020
    Configuration menu
    Copy the full SHA
    eb0f4d5 View commit details
    Browse the repository at this point in the history
  19. review comments

    estebank committed May 27, 2020
    Configuration menu
    Copy the full SHA
    3811232 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    2e2f820 View commit details
    Browse the repository at this point in the history
  21. fix rebase

    estebank committed May 27, 2020
    Configuration menu
    Copy the full SHA
    d0d30b0 View commit details
    Browse the repository at this point in the history
  22. Modify wording

    estebank committed May 27, 2020
    Configuration menu
    Copy the full SHA
    2b35247 View commit details
    Browse the repository at this point in the history
  23. fix rebase

    estebank committed May 27, 2020
    Configuration menu
    Copy the full SHA
    500504c View commit details
    Browse the repository at this point in the history
  24. fix rebase

    estebank committed May 27, 2020
    Configuration menu
    Copy the full SHA
    c52dbbc View commit details
    Browse the repository at this point in the history

Commits on May 28, 2020

  1. Add additional checks for isize overflow

    We now perform the correct checks even if the pointer size differs
    between the host and target.
    
    Signed-off-by: Joe Richey <joerichey@google.com>
    josephlr committed May 28, 2020
    Configuration menu
    Copy the full SHA
    7d5415b View commit details
    Browse the repository at this point in the history
  2. Fix rebase

    estebank committed May 28, 2020
    Configuration menu
    Copy the full SHA
    cb6408a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f213acf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0e3b31c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1bd6970 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2020

  1. Rollup merge of rust-lang#67460 - estebank:named-lts, r=nikomatsakis

    Tweak impl signature mismatch errors involving `RegionKind::ReVar` lifetimes
    
    Fix rust-lang#66406, fix rust-lang#72106.
    
    ```
    error: `impl` item signature doesn't match `trait` item signature
      --> $DIR/trait-param-without-lifetime-constraint.rs:14:5
       |
    LL |     fn get_relation(&self) -> To;
       |     ----------------------------- expected `fn(&Article) -> &ProofReader`
    ...
    LL |     fn get_relation(&self) -> &ProofReader {
       |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&Article) -> &ProofReader`
       |
       = note: expected `fn(&Article) -> &ProofReader`
                  found `fn(&Article) -> &ProofReader`
    help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
      --> $DIR/trait-param-without-lifetime-constraint.rs:10:31
       |
    LL |     fn get_relation(&self) -> To;
       |                               ^^ consider borrowing this type parameter in the trait
    ```
    
    r? @nikomatsakis
    RalfJung authored May 29, 2020
    Configuration menu
    Copy the full SHA
    7823651 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#71500 - josephlr:offset, r=oli-obk,RalfJung

    Make pointer offset methods/intrinsics const
    
    Implements rust-lang#71499 using [the implementations from miri](https://github.com/rust-lang/miri/blob/52f5d202bdcfe8986f0615845f8d1647ab8a2c6a/src/shims/intrinsics.rs#L96-L112).
    
    I added some tests what's allowed and what's UB. Let me know if any other cases should be added.
    
    CC: @RalfJung @oli-obk
    RalfJung authored May 29, 2020
    Configuration menu
    Copy the full SHA
    642e47e View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#71804 - petrochenkov:static-pie, r=cuviper

    linker: Support `-static-pie` and `-static -shared`
    
    This PR adds support for passing linker arguments for creating statically linked position-independent executables and "statically linked" shared libraries.
    
    Therefore it incorporates the majority of rust-lang#70740 except for the linker rerun hack and actually flipping the "`static-pie` is supported" switch for musl targets.
    RalfJung authored May 29, 2020
    Configuration menu
    Copy the full SHA
    d2f576c View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#71862 - LeSeulArtichaut:unsafe-block-in-uns…

    …afe-fn, r=nikomatsakis
    
    Implement RFC 2585: unsafe blocks in unsafe fn
    
    Tracking issue: rust-lang#71668
    r? @RalfJung cc @nikomatsakis
    RalfJung authored May 29, 2020
    Configuration menu
    Copy the full SHA
    abe39a0 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#72103 - lcnr:borrowck-localdefid, r=jonas-s…

    …chievink
    
    borrowck `DefId` -> `LocalDefId`
    
    Replaces some `DefId`s which must always be local with `LocalDefId` in `librustc_mir/borrowck`.
    
    cc @marmeladema
    RalfJung authored May 29, 2020
    Configuration menu
    Copy the full SHA
    1c0cd3f View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#72407 - Lucretiel:ipv6-display, r=Mark-Simu…

    …lacrum
    
    Various minor improvements to Ipv6Addr::Display
    
    Cleaned up `Ipv6Addr::Display`, especially with an eye towards simplifying and reducing duplicated logic. Also added a fast-path optimization, similar to rust-lang#72399 and rust-lang#72398.
    
    - Defer to `Ipv4Addr::fmt` when printing an Ipv4 address
    - Fast path: write directly to `f` without an intermediary buffer when there are no alignment options
    - Simplify finding the inner zeroes-span
    RalfJung authored May 29, 2020
    Configuration menu
    Copy the full SHA
    3374588 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#72419 - RalfJung:read-discriminant, r=oli-o…

    …bk,eddyb
    
    Miri read_discriminant: return a scalar instead of raw underlying bytes
    
    r? @oli-obk @eddyb
    RalfJung authored May 29, 2020
    Configuration menu
    Copy the full SHA
    6d7d00b View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#72439 - westernmagic:master, r=Amanieu

    NVPTX support for new asm!
    
    This PR implements the new `asm!` syntax for the `nvptx64-nvidia-cuda` target.
    
    r? @Amanieu
    RalfJung authored May 29, 2020
    Configuration menu
    Copy the full SHA
    e31227a View commit details
    Browse the repository at this point in the history