Skip to content

Rollup of 9 pull requests #121890

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 26 commits into from
Mar 2, 2024
Merged

Rollup of 9 pull requests #121890

merged 26 commits into from
Mar 2, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

squell and others added 26 commits March 17, 2023 14:33
When reading through this, I got slightly hung up thinking the `let` it was referring to was the `let tmp` on line 25, which was confusing considering the comment states that the temporary is freed at the end of the block. I think adding this clarification could potentially help some beginners like myself without being overly verbose.
To the module where it is used, so it doesn't have to be `pub`.
This just moves the server-relevant parts of handles into `server.rs`.
It introduces a new higher-order macro `with_api_handle_types` to avoid
some duplication.

This fixes two `FIXME` comments, and makes things clearer, by not having
server code in `client.rs`.
Clearer wording
fix typo in documentation for std::fs::Permissions

Please check and re-check this PR carefully to see if I got this right.

But by my logic, if the `read_only` function returns `true`, I would not expect be able to write to the file (it being read only); so this text is meant to clarify that `read_only` being `false` doesn't mean *you* can actually write to the file, just that "in general" someone is able to.
Update E0716.md for clarity

When reading through this, I got slightly hung up thinking the `let` it was referring to was the `let tmp` on line 25, which was confusing considering the comment states that the temporary is freed at the end of the block. I think adding this clarification could potentially help some beginners like myself without being overly verbose.
…sper

match lowering: pre-simplify or-patterns too

This is the final part of my work to simplify match pairs early: now we do it for or-patterns too. This makes it possible to collect fake borrows separately from the main match lowering algorithm. That'll enable more simplifications of or-pattern handling.

Note: I was tempted to have `Candidate` contain a `FlatPat`, but there are so many places that use `candidate.match_pairs` etc directly that I chose not to.

r? `@matthewjasper`
Display short types for unimplemented trait

Shortens unimplemented trait diagnostics. Now shows:

```
error[E0277]: `Option<Option<Option<...>>>` doesn't implement `std::fmt::Display`
  --> $DIR/on_unimplemented_long_types.rs:4:17
   |
LL |   pub fn foo() -> impl std::fmt::Display {
   |                   ^^^^^^^^^^^^^^^^^^^^^^ `Option<Option<Option<...>>>` cannot be formatted with the default formatter
LL |
LL | /     Some(Some(Some(Some(Some(Some(Some(Some(Some(S...
LL | |         Some(Some(Some(Some(Some(Some(Some(Some(So...
LL | |             Some(Some(Some(Some(Some(Some(Some(Som...
LL | |                 Some(Some(Some(Some(Some(Some(Some...
...  |
LL | |         ))))))))))),
LL | |     )))))))))))
   | |_______________- return type was inferred to be `Option<Option<Option<...>>>` here
   |
   = help: the trait `std::fmt::Display` is not implemented for `Option<Option<Option<...>>>`
   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
```

I'm not 100% sure if this is desirable, or if we should just let the long types remain long. This is also kinda a short-term bandaid solution. The real long term solution is to properly migrate `rustc_trait_selection`'s error reporting to use translatable diagnostics and then properly handle type name printing.

Fixes rust-lang#121687.
…est31

Move `gather_comments`.

To the module where it is used, so it doesn't have to be `pub`.

r? ```@est31```
Move `HandleStore` into `server.rs`.

This just moves the server-relevant parts of handles into `server.rs`. It introduces a new higher-order macro `with_api_handle_types` to avoid some duplication.

This fixes two `FIXME` comments, and makes things clearer, by not having server code in `client.rs`.

r? ```@bjorn3```
…les, r=workingjubilee

Use the guaranteed precision of a couple of float functions in docs
…r-errors

 Account for unmet T: !Copy in E0277 message

```
error[E0277]: the trait bound `T: !Copy` is not satisfied
  --> $DIR/simple.rs:10:16
   |
LL |     not_copy::<T>();
   |                ^ the trait bound `T: !Copy` is not satisfied
```
instead of the current

```
error[E0277]: the trait bound `T: !Copy` is not satisfied
  --> $DIR/simple.rs:10:16
   |
LL |     not_copy::<T>();
   |                ^ the trait `!Copy` is not implemented for `T`
```
@rustbot rustbot added 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. rollup A PR which is a rollup labels Mar 2, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=9

@bors
Copy link
Collaborator

bors commented Mar 2, 2024

📌 Commit 07bd459 has been approved by matthiaskrgr

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 Mar 2, 2024
@bors
Copy link
Collaborator

bors commented Mar 2, 2024

⌛ Testing commit 07bd459 with merge 5257aee...

@bors
Copy link
Collaborator

bors commented Mar 2, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 5257aee to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 2, 2024
@bors bors merged commit 5257aee into rust-lang:master Mar 2, 2024
@rustbot rustbot added this to the 1.78.0 milestone Mar 2, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#109263 fix typo in documentation for std::fs::Permissions cc2dceb471cd770ca2ba885b8e1d9a891203bbf0 (link)
#120684 Update E0716.md for clarity a76ea8549f02c651cf79d7ba6cc62bd6d65c682c (link)
#121715 match lowering: pre-simplify or-patterns too 76198fbc44a098ac4e9ce53cbff6ae5003963e76 (link)
#121739 Display short types for unimplemented trait 77ad0d807e0e389cc6d69e82bdf6e68b0d76ed9c (link)
#121815 Move gather_comments. 0953aa4096837d64384dc3b26e7fa01083340267 (link)
#121835 Move HandleStore into server.rs. 7709161c557ef737780c6837929bfa0669a885d8 (link)
#121847 Remove hidden use of Global 3e2cadc1f3df3cc0f43b39d6270387f5c888beff (link)
#121861 Use the guaranteed precision of a couple of float functions… 19492aa530e0304a942ce121342056da1c2e4423 (link)
#121875 Account for unmet T: !Copy in E0277 message 05aba31c8720728d6da3be6db6bdecd0fa73d194 (link)

previous master: 2e3581bca9

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

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5257aee): 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.2% [0.2%, 0.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.2% [0.2%, 0.2%] 1

Max RSS (memory usage)

Results

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)
- - 0
Improvements ✅
(primary)
-6.0% [-6.0%, -5.9%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -6.0% [-6.0%, -5.9%] 2

Cycles

Results

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)
- - 0
Improvements ✅
(primary)
-1.0% [-1.0%, -1.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.0% [-1.0%, -1.0%] 1

Binary size

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

Bootstrap: 652.002s -> 652.672s (0.10%)
Artifact size: 175.52 MiB -> 175.51 MiB (-0.00%)

@matthiaskrgr matthiaskrgr deleted the rollup-mv26uwt branch March 16, 2024 18:19
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.