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 7 pull requests #83790

Merged
merged 28 commits into from
Apr 2, 2021
Merged

Rollup of 7 pull requests #83790

merged 28 commits into from
Apr 2, 2021

Commits on Mar 25, 2021

  1. Add SharedResource abstraction and use it in write_shared

    This cleans up the code quite a bit, and also makes the next commit much
    easier.
    jyn514 committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    7c89cc4 View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2021

  1. Add unstable option to only emit shared/crate-specific files

    The intended use case is for docs.rs, which can now copy exactly the
    files it cares about, rather than having to guess based on whether they
    have a resource suffix or not. In particular, some files have a resource
    suffix but cannot be shared between crates: rust-lang/docs.rs#1312 (comment)
    
    The end goal is to fix rust-lang/docs.rs#1327
    by reverting rust-lang/docs.rs#1324.
    
    This obsoletes `--print=unversioned-files`, which I plan to remove as
    soon as docs.rs stops using it.
    jyn514 committed Mar 26, 2021
    Configuration menu
    Copy the full SHA
    f77ebd4 View commit details
    Browse the repository at this point in the history
  2. Rework std::sys::windows::alloc

    Add documentation to the system functions and `SAFETY` comments.
    Refactored helper functions, fixing the correctness of `get_header`.
    CDirkx committed Mar 26, 2021
    Configuration menu
    Copy the full SHA
    0dbed61 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>
    CDirkx and dtolnay committed Mar 26, 2021
    Configuration menu
    Copy the full SHA
    b01bf0e View commit details
    Browse the repository at this point in the history
  4. Cache GetProcessHeap

    CDirkx committed Mar 26, 2021
    Configuration menu
    Copy the full SHA
    4cce9e3 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2021

  1. Configuration menu
    Copy the full SHA
    fa89c0f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    421f5d2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f2e52ff View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2021

  1. give full path of constraint in suggest_constraining_type_param

    revert file
    
    bless with nll mode
    Rustin170506 committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    8f77356 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e78fac5 View commit details
    Browse the repository at this point in the history
  3. Enforce that Toolchain files are static and Crate files are dynamic

    This also changes custom themes from Toolchain to Crate files.
    jyn514 committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    d4f3f91 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1086d9b View commit details
    Browse the repository at this point in the history
  5. Fix --external-css to be invocation-specific and note main.js shoul…

    …d be invocation specific
    jyn514 committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    413938d View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2021

  1. Update lint message

    arora-aman committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    18af989 View commit details
    Browse the repository at this point in the history
  2. Update test cases

    arora-aman committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    da86348 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2021

  1. Configuration menu
    Copy the full SHA
    a721957 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1b9620d View commit details
    Browse the repository at this point in the history
  3. Fix stack overflow detection on FreeBSD 11.1+

    Beginning with FreeBSD 10.4 and 11.1, there is one guard page by
    default.  And the stack autoresizes, so if Rust allocates its own guard
    page, then FreeBSD's will simply move up one page.  The best solution is
    to just use the OS's guard page.
    asomers committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    ca14abb View commit details
    Browse the repository at this point in the history
  4. Simplify coverage tests

    This change reduces the risk of impacting coverage tests on unrelated
    changes (such as MIR and Span changes), and reduces the burden when
    blessing coverage changes in case it is necessary.
    
    * Remove all spanview tests. The spanview tests were useful during
      development, but they can be generated as needed, via compiler command
      line flags. They aren't critical to confirming coverage results. (The
      coverage report tests are sufficient.)
    
      When spanview regeneration was necessary, the diffs were way too hard
      to read to be useful anyway. So I'm removing them to reduce friction
      from a feature that is no longer useful.
    
    * Remove the requirement for `llvm-cov show --debug` when blessing
      tests. The `--debug` flag is, unfortunately, only available if LLVM is
      built with `optimize = false` (in Rust's config.toml). This adds
      significant time and resource burdens to the contributor's build. As
      it turns out, for other reasons in the past, I wasn't actually using
      the debug output (counter info) to validate coverage anymore either,
      so it was required for no reason, I now realize.
    richkadel committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    fad5388 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c86e098 View commit details
    Browse the repository at this point in the history
  6. Remove debug_assert

    CDirkx committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    db1d003 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#83065 - CDirkx:win-alloc, r=dtolnay

    Rework `std::sys::windows::alloc`
    
    I came across rust-lang#76676 (comment), which points out that there was unsound code in the Windows alloc code, creating a &mut to possibly uninitialized memory. I reworked the code so that that particular issue does not occur anymore, and started adding more documentation and safety comments.
    
    Full list of changes:
     - moved and documented the relevant Windows Heap API functions
     - refactor `allocate_with_flags` to `allocate` (and remove the other helper functions), which now takes just a `bool` if the memory should be zeroed
     - add checks for if `GetProcessHeap` returned null
     - add a test that checks if the size and alignment of a `Header` are indeed <= `MIN_ALIGN`
     - add `#![deny(unsafe_op_in_unsafe_fn)]` and the necessary unsafe blocks with safety comments
    
    I feel like I may have overdone the documenting, the unsoundness fix is the most important part; I could spit this PR up in separate parts.
    Dylan-DPC committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    48ebad5 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#83478 - jyn514:fine-grained-files, r=Mark-S…

    …imulacrum
    
    rustdoc: Add unstable option to only emit shared/crate-specific files
    
    The intended use case is for docs.rs, which can now copy exactly the
    files it cares about, rather than having to guess based on whether they
    have a resource suffix or not. In particular, some files have a resource
    suffix but cannot be shared between crates: rust-lang/docs.rs#1312 (comment)
    
    The end goal is to fix rust-lang/docs.rs#1327 by reverting rust-lang/docs.rs#1324.
    
    This obsoletes `--print=unversioned-files`, which I plan to remove as
    soon as docs.rs stops using it.
    
    I recommend reviewing this one commit at a time.
    
    r? ``@GuillaumeGomez`` cc ``@Nemo157`` ``@pietroalbini``
    Dylan-DPC committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    31f5320 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#83629 - the8472:fix-inplace-panic-on-drop, …

    …r=m-ou-se
    
    Fix double-drop in `Vec::from_iter(vec.into_iter())` specialization when items drop during panic
    
    This fixes the double-drop but it leaves a behavioral difference compared to the default implementation intact: In the default implementation the source and the destination vec are separate objects, so they get dropped separately. Here they share an allocation and the latter only exists as a pointer into the former. So if dropping the former panics then this fix will leak more items than the default implementation would. Is this acceptable or should the specialization also mimic the default implementation's drops-during-panic behavior?
    
    Fixes rust-lang#83618
    
    `@rustbot` label T-libs-impl
    Dylan-DPC committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    542f441 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#83673 - hi-rustin:rustin-patch-suggestion, …

    …r=estebank
    
    give full path of constraint in suggest_constraining_type_param
    
    close rust-lang#83513
    Dylan-DPC committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    6cb74ad View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#83755 - richkadel:cov-test-simplify, r=tmandry

    Simplify coverage tests
    
    This change reduces the risk of impacting coverage tests on unrelated
    changes (such as MIR and Span changes), and reduces the burden when
    blessing coverage changes in case it is necessary.
    
    * Remove all spanview tests. The spanview tests were useful during
      development, but they can be generated as needed, via compiler command
      line flags. They aren't critical to confirming coverage results. (The
      coverage report tests are sufficient.)
    
      When spanview regeneration was necessary, the diffs were way too hard
      to read to be useful anyway. So I'm removing them to reduce friction
      from a feature that is no longer useful.
    
    * Remove the requirement for `llvm-cov show --debug` when blessing
      tests. The `--debug` flag is, unfortunately, only available if LLVM is
      built with `optimize = false` (in Rust's config.toml). This adds
      significant time and resource burdens to the contributor's build. As
      it turns out, for other reasons in the past, I wasn't actually using
      the debug output (counter info) to validate coverage anymore either,
      so it was required for no reason, I now realize.
    Dylan-DPC committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    7009117 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#83757 - sexxi-goose:migrations_out, r=nikom…

    …atsakis
    
    2229: Support migration via rustfix
    
    - Adds support of machine applicable suggestions for `disjoint_capture_drop_reorder`.
    - Doesn't migrate in the case of pre-existing bugs in user code
    
    r? ``@nikomatsakis``
    Dylan-DPC committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    eed73c6 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#83771 - asomers:stack_overflow_freebsd, r=d…

    …tolnay
    
    Fix stack overflow detection on FreeBSD 11.1+
    
    Beginning with FreeBSD 10.4 and 11.1, there is one guard page by
    default.  And the stack autoresizes, so if Rust allocates its own guard
    page, then FreeBSD's will simply move up one page.  The best solution is
    to just use the OS's guard page.
    Dylan-DPC committed Apr 2, 2021
    Configuration menu
    Copy the full SHA
    cb7133f View commit details
    Browse the repository at this point in the history