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 11 pull requests #126914

Merged
merged 28 commits into from
Jun 24, 2024
Merged

Rollup of 11 pull requests #126914

merged 28 commits into from
Jun 24, 2024

Commits on Jun 14, 2024

  1. Configuration menu
    Copy the full SHA
    3af6242 View commit details
    Browse the repository at this point in the history
  2. Fix typo in -Cno-stack-check deprecation warning

    The flag `--no-stack-check` does not exist:
    
        $ rustc --no-stack-check
        error: Unrecognized option: 'no-stack-check'. Did you mean `-C no-stack-check`?
    Enselic committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    651ff64 View commit details
    Browse the repository at this point in the history
  3. Deprecate no-op codegen option -Cinline-threshold=...

    This deprecates `-Cinline-threshold` since using it has no effect. This
    has been the case since the new LLVM pass manager started being used,
    more than 2 years ago.
    Enselic committed Jun 14, 2024
    Configuration menu
    Copy the full SHA
    f5f067b View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2024

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

Commits on Jun 19, 2024

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

Commits on Jun 23, 2024

  1. SmartPointer derive-macro

    Co-authored-by: Wedson Almeida Filho <walmeida@microsoft.com>
    dingxiangfei2009 and wedsonaf committed Jun 23, 2024
    Configuration menu
    Copy the full SHA
    f1be59f View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2024

  1. coverage: Forbid multiple #[coverage(..)] attributes

    It might make sense to allow this in the future, if we add values that aren't
    mutually exclusive, but for now having multiple coverage attributes on one item
    is useless.
    Zalathar committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    b5dfeba View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a000fa8 View commit details
    Browse the repository at this point in the history
  3. coverage: Always error on #[coverage(..)] in unexpected places

    This upgrades some warnings to errors, and also catches cases where the
    attribute was silently ignored.
    Zalathar committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    b7c057c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1852141 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ba5ec1f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8ffb5f9 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1c4d0ce View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    8fc6b3d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    84474a2 View commit details
    Browse the repository at this point in the history
  10. add @Kobzol to bootstrap team for triagebot

    Signed-off-by: onur-ozkan <work@onurozkan.dev>
    onur-ozkan committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    45261ff View commit details
    Browse the repository at this point in the history
  11. Replace MaybeUninit::uninit_array() with array repeat expression.

    This is possible now that inline const blocks are stable; the idea was
    even mentioned as an alternative when `uninit_array()` was added:
    <rust-lang#65580 (comment)>
    
    > if it’s stabilized soon enough maybe it’s not worth having a
    > standard library method that will be replaceable with
    > `let buffer = [MaybeUninit::<T>::uninit(); $N];`
    
    Const array repetition and inline const blocks are now stable (in the
    next release), so that circumstance has come to pass, and we no longer
    have reason to want `uninit_array()` other than convenience. Therefore,
    let’s evaluate the inconvenience by not using `uninit_array()` in
    the standard library, before potentially deleting it entirely.
    kpreid committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    13fca73 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#124460 - long-long-float:show-notice-about-…

    …enum-with-debug, r=pnkfelix
    
    Show notice about  "never used" of Debug for enum
    
    Close rust-lang#123068
    
    If an ADT implements `Debug` trait and it is not used, the compiler says a note that indicates intentionally ignored during dead code analysis as [this note](https://github.com/rust-lang/rust/blob/2207179a591f5f252885a94ab014dafeb6e8e9e8/tests/ui/lint/dead-code/unused-variant.stderr#L9).
    However this node is not shown for variants that have fields in enum. This PR fixes to show the note.
    compiler-errors committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    00e5f58 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#124712 - Enselic:deprecate-inline-threshold…

    …, r=pnkfelix
    
    Deprecate no-op codegen option `-Cinline-threshold=...`
    
    This deprecates `-Cinline-threshold` since using it has no effect. This has been the case since the new LLVM pass manager started being used, more than 2 years ago.
    
    Recommend using `-Cllvm-args=--inline-threshold=...` instead.
    
    Closes rust-lang#89742 which is E-help-wanted.
    compiler-errors committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    faa28be View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#125082 - kpreid:const-uninit, r=dtolnay

    Remove `MaybeUninit::uninit_array()` and replace it with inline const blocks.
    
    \[This PR originally contained the changes in rust-lang#125995 too. See edit history for the original PR description.]
    
    The documentation of `MaybeUninit::uninit_array()` says:
    
    > Note: in a future Rust version this method may become unnecessary when Rust allows [inline const expressions](rust-lang#76001). The example below could then use `let mut buf = [const { MaybeUninit::<u8>::uninit() }; 32];`.
    
    The PR adding it also said: <rust-lang#65580 (comment)>
    
    > if it’s stabilized soon enough maybe it’s not worth having a standard library method that will be replaceable with `let buffer = [MaybeUninit::<T>::uninit(); $N];`
    
    That time has come to pass — inline const expressions are stable — so `MaybeUninit::uninit_array()` is now unnecessary. The only remaining question is whether it is an important enough *convenience* to keep it around.
    
    I believe it is net good to remove this function, on the principle that it is better to compose two orthogonal features (`MaybeUninit` and array construction) than to have a specific function for the specific combination, now that that is possible.
    compiler-errors committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    c77dc28 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#125575 - dingxiangfei2009:derive-smart-ptr,…

    … r=davidtwco
    
    SmartPointer derive-macro
    
    <!--
    If this PR is related to an unstable feature or an otherwise tracked effort,
    please link to the relevant tracking issue here. If you don't know of a related
    tracking issue or there are none, feel free to ignore this.
    
    This PR will get automatically assigned to a reviewer. In case you would like
    a specific user to review your work, you can assign it to them by using
    
        r​? <reviewer name>
    -->
    
    Possibly replacing rust-lang#123472 for continued upkeep of the proposal rust-lang/rfcs#3621 and implementation of the tracking issue rust-lang#123430.
    
    cc `@Darksonn` `@wedsonaf`
    compiler-errors committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    ed460d2 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#126413 - matthiaskrgr:crshmsg, r=oli-obk

    compiletest: make the crash test error message abit more informative
    
    r?  ```@oli-obk```
    compiler-errors committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    46e4398 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#126673 - oli-obk:dont_rely_on_err_reporting…

    …, r=compiler-errors
    
    Ensure we don't accidentally succeed when we want to report an error
    
    This also changes the `DefiningOpaqueTypes::No` to `Yes` without adding tests, as it is solely run on the error path to improve diagnostics. I was unable to provide a test that changes diagnostics, as all the tests I came up with ended up successfully constraining the opaque type and thus succeeding the coercion.
    
    r? ```@compiler-errors```
    
    cc rust-lang#116652
    compiler-errors committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    49bdf46 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#126682 - Zalathar:coverage-attr, r=lcnr

    coverage: Overhaul validation of the `#[coverage(..)]` attribute
    
    This PR makes sweeping changes to how the (currently-unstable) coverage attribute is validated:
    - Multiple coverage attributes on the same item/expression are now treated as an error.
    - The attribute must always be `#[coverage(off)]` or `#[coverage(on)]`, and the error messages for this are more consistent.
      -  A trailing comma is still allowed after off/on, since that's part of the normal attribute syntax.
    - Some places that silently ignored a coverage attribute now produce an error instead.
      - These cases were all clearly bugs.
    - Some places that ignored a coverage attribute (with a warning) now produce an error instead.
      - These were originally added as lints, but I don't think it makes much sense to knowingly allow new attributes to be used in meaningless places.
      - Some of these errors might soon disappear, if it's easy to extend recursive coverage attributes to things like modules and impl blocks.
    
    ---
    
    One of the goals of this PR is to lay a more solid foundation for making the coverage attribute recursive, so that it applies to all nested functions/closures instead of just the one it is directly attached to.
    
    Fixes rust-lang#126658.
    
    This PR incorporates rust-lang#126659, which adds more tests for validation of the coverage attribute.
    
    `@rustbot` label +A-code-coverage
    compiler-errors committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    9ce2a07 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#126899 - GrigorenkoPV:suggest-const-block, …

    …r=davidtwco
    
    Suggest inline const blocks for array initialization
    
    rust-lang#126894
    compiler-errors committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    a7721a0 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#126904 - GrigorenkoPV:nonzero-fixme, r=joboet

    Small fixme in core now that NonZero is generic
    
    I doubt I have the rights to, but
    `@bors` rollup=always
    compiler-errors committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    85eb835 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#126909 - onur-ozkan:add-kobzol, r=matthiaskrgr

    add @Kobzol to bootstrap team for triagebot
    
    Welcome ``@Kobzol`` !
    compiler-errors committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    59c258f View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#126911 - oli-obk:do_not_count_errors, r=com…

    …piler-errors
    
    Split the lifetimes of `MirBorrowckCtxt`
    
    These lifetimes are sometimes too general and will link things together that are independent. These are a blocker for actually finishing tracking more state (e.g. error tainting) in the diagnostic context handle, and I'd rather land it in its own PR instead of together with functional changes.
    
    Also changes a bunch of named lifetimes to `'_` where they were irrelevant
    
    follow-up to rust-lang#126623
    compiler-errors committed Jun 24, 2024
    Configuration menu
    Copy the full SHA
    16bd6e2 View commit details
    Browse the repository at this point in the history