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 10 pull requests #129540

Merged
merged 22 commits into from
Aug 25, 2024
Merged

Rollup of 10 pull requests #129540

merged 22 commits into from
Aug 25, 2024

Commits on Aug 3, 2024

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

Commits on Aug 6, 2024

  1. Add a special case for CStr/CString in the improper_ctypes lint

    Instead of saying to "consider adding a `#[repr(C)]` or
    `#[repr(transparent)]` attribute to this struct", we now tell users to
    "Use `*const ffi::c_char` instead, and pass the value from
    `CStr::as_ptr()`" when the type involved is a `CStr` or a `CString`.
    
    Co-authored-by: Jieyou Xu <[email protected]>
    Flying-Toast and jieyouxu committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    b335ec9 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2024

  1. Detect * operator on !Sized expression

    ```
    error[E0277]: the size for values of type `str` cannot be known at compilation time
      --> $DIR/unsized-str-in-return-expr-arg-and-local.rs:15:9
       |
    LL |     let x = *"";
       |         ^ doesn't have a size known at compile-time
       |
       = help: the trait `Sized` is not implemented for `str`
       = note: all local variables must have a statically known size
       = help: unsized locals are gated as an unstable feature
    help: references are always `Sized`, even if they point to unsized data; consider not dereferencing the expression
       |
    LL -     let x = *"";
    LL +     let x = "";
       |
    ```
    estebank committed Aug 8, 2024
    Configuration menu
    Copy the full SHA
    f6767f7 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2024

  1. Configuration menu
    Copy the full SHA
    4c5e888 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b968b26 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c65ef3d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    62f7d53 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5c6285c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5cef88c View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2024

  1. make text more easy to read

    tshepang authored Aug 24, 2024
    Configuration menu
    Copy the full SHA
    32e34ee View commit details
    Browse the repository at this point in the history
  2. remove extraneous text

    tshepang authored Aug 24, 2024
    Configuration menu
    Copy the full SHA
    f734f3d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    027c479 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2024

  1. Rollup merge of rust-lang#128467 - estebank:unsized-args, r=cjgillot

    Detect `*` operator on `!Sized` expression
    
    The suggestion is new:
    
    ```
    error[E0277]: the size for values of type `str` cannot be known at compilation time
      --> $DIR/unsized-str-in-return-expr-arg-and-local.rs:15:9
       |
    LL |     let x = *"";
       |         ^ doesn't have a size known at compile-time
       |
       = help: the trait `Sized` is not implemented for `str`
       = note: all local variables must have a statically known size
       = help: unsized locals are gated as an unstable feature
    help: references to `!Sized` types like `&str` are `Sized`; consider not dereferencing the expression
       |
    LL -     let x = *"";
    LL +     let x = "";
       |
    ```
    
    Fix rust-lang#128199.
    tgross35 authored Aug 25, 2024
    Configuration menu
    Copy the full SHA
    0030892 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#128524 - chenyukang:yukang-fix-127930-inval…

    …id-outer-style-sugg, r=cjgillot
    
    Don't suggest turning crate-level attributes into outer style
    
    Fixes rust-lang#127930
    tgross35 authored Aug 25, 2024
    Configuration menu
    Copy the full SHA
    dfe7d5c View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#128735 - jieyouxu:pr-120176-revive, r=cjgillot

    Add a special case for `CStr`/`CString` in the `improper_ctypes` lint
    
    Revives rust-lang#120176. Just needed to bless a test and fix an argument, but seemed reasonable to me otherwise.
    
    Instead of saying to "consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct", we now tell users to "Use `*const ffi::c_char` instead, and pass the value from `CStr::as_ptr()`" when the type involved is a `CStr` or a `CString`.
    
    The suggestion is not made for `&mut CString` or `*mut CString`.
    
    r? ``````@cjgillot`````` (since you were the reviewer of the original PR rust-lang#120176, but feel free to reroll)
    tgross35 authored Aug 25, 2024
    Configuration menu
    Copy the full SHA
    198a68d View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#129429 - cjgillot:named-variance, r=compile…

    …r-errors
    
    Print the generic parameter along with the variance in dumps.
    
    This allows to make sure we are testing what we think we are testing.
    
    While the tests are correct, I discovered that opaque duplicated args are in the reverse declaration order.
    tgross35 authored Aug 25, 2024
    Configuration menu
    Copy the full SHA
    2269381 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#129430 - lolbinarycat:rustdoc-search-exact-…

    …case, r=notriddle
    
    rustdoc: show exact case-sensitive matches first
    
    fixes rust-lang#119480
    tgross35 authored Aug 25, 2024
    Configuration menu
    Copy the full SHA
    093249a View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#129449 - coolreader18:pin-as_deref_mut-sign…

    …ature, r=dtolnay
    
    Put Pin::as_deref_mut in impl Pin<Ptr> / rearrange Pin methods
    
    Tracking issue: rust-lang#86918
    
    Based on the suggestion in rust-lang#86918 (comment)
    
    > Some advantages:
    >
    >  * Synergy with the existing `as_ref` and `as_mut` signatures (stable since Rust 1.33)
    >
    >  * Lifetime elision reduces noise in the signature
    >
    >  * Turbofish less verbose: `Pin::<&mut T>::as_deref_mut` vs `Pin::<&mut Pin<&mut T>>::as_deref_mut`
    
    The comment seemed to imply that `Pin::as_ref` and `Pin::as_mut` already share an impl block, which they don't. So, I rearranged it so that they do, and we can see which looks better in the docs.
    
    <details><summary><b>Docs screenshots</b></summary>
    
    Current nightly:
    ![image](https://github.com/user-attachments/assets/b432cb82-8f4b-48ae-bafc-2fe49d0ad48c)
    
    `Pin::as_deref_mut` moved into the same block as `as_mut`:
    ![image](https://github.com/user-attachments/assets/f9b35722-6a88-4465-ad1c-28d8e91902ac)
    
    `Pin::as_ref`, `as_mut`, and `as_deref_mut` all in the same block:
    ![image](https://github.com/user-attachments/assets/9a1b2bf0-70a6-4751-b13f-390f1d575244)
    
    </details>
    
    I think I like the last one the most; obviously I'm biased since I'm the one who rearranged it, but it doesn't make sense to me to have `as_ref` methods split up by an `into_inner` method.
    
    r? dtolnay
    tgross35 authored Aug 25, 2024
    Configuration menu
    Copy the full SHA
    e96faab View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#129481 - scottmcm:update-cb, r=tgross35

    Update `compiler_builtins` to `0.1.121`
    
    To pick up rust-lang/compiler-builtins#673 and unblock rust-lang#129403
    
    r? tgross35
    tgross35 authored Aug 25, 2024
    Configuration menu
    Copy the full SHA
    678193f View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#129482 - thomcc:add-to-review-rotation, r=j…

    …ieyouxu
    
    Add myself to the review rotation for libs
    
    I am feeling better, and my new job gives me some time to do this.
    tgross35 authored Aug 25, 2024
    Configuration menu
    Copy the full SHA
    dd05261 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#129492 - tshepang:patch-2, r=chenyukang

    Make wasm32 platform support docs easier to read
    tgross35 authored Aug 25, 2024
    Configuration menu
    Copy the full SHA
    2412d3c View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#129512 - lolbinarycat:linkchecker-impl-docs…

    …, r=ehuss
    
    update the doc comment on lintchecker b/c it parses html now
    tgross35 authored Aug 25, 2024
    Configuration menu
    Copy the full SHA
    11ebb59 View commit details
    Browse the repository at this point in the history