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

Conversation

tgross35
Copy link
Contributor

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

chenyukang and others added 22 commits August 4, 2024 00:11
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
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Aug 25, 2024
@tgross35
Copy link
Contributor Author

Basically a repeat of #129506.

@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Aug 25, 2024

📌 Commit 11ebb59 has been approved by tgross35

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 25, 2024
@bors
Copy link
Contributor

bors commented Aug 25, 2024

⌛ Testing commit 11ebb59 with merge ed3c20b...

bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 25, 2024
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
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-msvc-ext failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Contributor

bors commented Aug 25, 2024

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 25, 2024
@tgross35
Copy link
Contributor Author

error: couldn't create a temp dir: Access is denied. (os error 5) at path "C:\\a\\_temp\\msys64\\tmp\\rustcAND7yQ"

#127883

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 25, 2024
@jieyouxu
Copy link
Member

huh this is a tempdir not exe

@tgross35
Copy link
Contributor Author

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 😃

@jieyouxu
Copy link
Member

It's interesting because I'm suspecting there's multiple bugs/problems, exes are just one of them

@bors
Copy link
Contributor

bors commented Aug 25, 2024

⌛ Testing commit 11ebb59 with merge 697d953...

@bors
Copy link
Contributor

bors commented Aug 25, 2024

☀️ Test successful - checks-actions
Approved by: tgross35
Pushing 697d953 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 25, 2024
@bors bors merged commit 697d953 into rust-lang:master Aug 25, 2024
7 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 25, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#128467 Detect * operator on !Sized expression 86bccf772afd940e2f7bd675dd6035360dba2b4e (link)
#128524 Don't suggest turning crate-level attributes into outer sty… 271bf96517e0b708582dbbfdd741ff9ea298fe3e (link)
#128735 Add a special case for CStr/CString in the `improper_ct… 59dfb3ce369fb84a1c597e4400939adb6f2a61e2 (link)
#129429 Print the generic parameter along with the variance in dump… 76896dbe3049065198c3d7dbad5cc667257af986 (link)
#129430 rustdoc: show exact case-sensitive matches first d0745dd77c6b4084b9c3f41400722ba5f47a7b14 (link)
#129449 Put Pin::as_deref_mut in impl Pin / rearrange Pin meth… fa56d15f25f32a7bb7cd2999b4358a8c4fdde655 (link)
#129481 Update compiler_builtins to 0.1.121 8767da3f70d1f42225d942cca07cb92a00ce64ee (link)
#129482 Add myself to the review rotation for libs 07a4f5fe01ea52f28c74aa40f1812281dc22f655 (link)
#129492 Make wasm32 platform support docs easier to read 72556aee431c60ca3a6c1aa471d902e2fa9a7d57 (link)
#129512 update the doc comment on lintchecker b/c it parses html now 7165a6645f1ad3bd4589c4fe0d89b665136655d0 (link)

previous master: f167efad2f

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@tgross35
Copy link
Contributor Author

Woo!

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (697d953): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.3% [0.2%, 0.4%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.2% [1.8%, 8.2%] 3
Improvements ✅
(primary)
-1.2% [-1.2%, -1.2%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.2% [-1.2%, -1.2%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 750.904s -> 749.664s (-0.17%)
Artifact size: 338.92 MiB -> 338.97 MiB (0.02%)

@jieyouxu jieyouxu added the CI-spurious-fail-msvc CI spurious failure: target env msvc label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself CI-spurious-fail-msvc CI spurious failure: target env msvc merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.