-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rollup of 10 pull requests #129540
Conversation
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 <jieyouxu@outlook.com>
``` 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 = ""; | ```
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.
…id-outer-style-sugg, r=cjgillot Don't suggest turning crate-level attributes into outer style Fixes rust-lang#127930
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)
…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.
…case, r=notriddle rustdoc: show exact case-sensitive matches first fixes rust-lang#119480
…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
Update `compiler_builtins` to `0.1.121` To pick up rust-lang/compiler-builtins#673 and unblock rust-lang#129403 r? tgross35
…ieyouxu Add myself to the review rotation for libs I am feeling better, and my new job gives me some time to do this.
Make wasm32 platform support docs easier to read
…, r=ehuss update the doc comment on lintchecker b/c it parses html now
Rollup of 10 pull requests Successful merges: - rust-lang#128467 (Detect `*` operator on `!Sized` expression) - rust-lang#128524 (Don't suggest turning crate-level attributes into outer style) - rust-lang#128735 (Add a special case for `CStr`/`CString` in the `improper_ctypes` lint) - rust-lang#129429 (Print the generic parameter along with the variance in dumps.) - rust-lang#129430 (rustdoc: show exact case-sensitive matches first) - rust-lang#129449 (Put Pin::as_deref_mut in impl Pin<Ptr> / rearrange Pin methods) - rust-lang#129481 (Update `compiler_builtins` to `0.1.121`) - rust-lang#129482 (Add myself to the review rotation for libs) - rust-lang#129492 (Make wasm32 platform support docs easier to read) - rust-lang#129512 (update the doc comment on lintchecker b/c it parses html now) r? `@ghost` `@rustbot` modify labels: rollup
💔 Test failed - checks-actions |
huh this is a tempdir not exe |
I wasn't positive about it either - but the first error in the sample errors from Eric's top post at #127883 is a temp directory so it seems possible. And none of the included PRs really seem likely to cause a tmpdir issue in Cargo. Don't mind me, just trying to collect the rarest of CI failures after that 3x in a row yesterday 😃 |
It's interesting because I'm suspecting there's multiple bugs/problems, exes are just one of them |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: f167efad2f In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Woo! |
Finished benchmarking commit (697d953): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)Results (primary -1.2%, secondary 4.2%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 750.904s -> 749.664s (-0.17%) |
Successful merges:
*
operator on!Sized
expression #128467 (Detect*
operator on!Sized
expression)CStr
/CString
in theimproper_ctypes
lint #128735 (Add a special case forCStr
/CString
in theimproper_ctypes
lint)compiler_builtins
to0.1.121
#129481 (Updatecompiler_builtins
to0.1.121
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup