Skip to content

Rollup of 7 pull requests - #95653

Merged
bors merged 29 commits into
rust-lang:masterfrom
Dylan-DPC:rollup-2p9hzi3
Apr 4, 2022
Merged

Rollup of 7 pull requests#95653
bors merged 29 commits into
rust-lang:masterfrom
Dylan-DPC:rollup-2p9hzi3

Conversation

@Dylan-DPC

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Xaeroxeand others added 29 commits January 15, 2022 12:48
stabilize windows_process_extensions_raw_arg
Stabilizes the feature tracked at rust-lang#92939
Reduce unnecessary escaping in proc_macro::Literal::character/string
I noticed that https://doc.rust-lang.org/proc_macro/struct.Literal.html#method.character is producing unreadable literals that make macro-expanded code unnecessarily hard to read. Since the proc macro server was using `escape_unicode()`, every char is escaped using `\u{…}` regardless of whether there is any need to do so. For example `Literal::character('=')` would previously produce `'\u{3d}'` which unnecessarily obscures the meaning when reading the macro-expanded code.
I've changed Literal::string also in this PR because `str`'s `Debug` impl is also smarter than just calling `escape_debug` on every char. For example `Literal::string("ferris's")` would previously produce `"ferris\'s"` but will now produce `"ferris's"`.
…cottmcm
Stabilize total_cmp
Stabilises `total_cmp` for Rust 1.61.0. Tracking issue: rust-lang#72599
…plett
Add SyncUnsafeCell.
This adds `SyncUnsafeCell`, which is just `UnsafeCell` except it implements `Sync`.
This was first proposed under the name `RacyUnsafeCell` here: rust-lang#53639 (comment) and here: rust-lang#53639 (comment) and here: rust-lang#53639 (comment)
It allows you to create an UnsafeCell that is Sync without having to wrap it in a struct first (and then implement Sync for that struct).
E.g. `static X: SyncUnsafeCell<i32>`. Using a regular `UnsafeCell` as `static` is not possible, because it isn't `Sync`. We have a language workaround for it called `static mut`, but it's nice to be able to use the proper type for such unsafety instead.
It also makes implementing synchronization primitives based on unsafe cells slightly less verbose, because by using `SyncUnsafeCell` for `UnsafeCell`s that are shared between threads, you don't need a separate `impl<..> Sync for ..`. Using this type also clearly documents that the cell is expected to be accessed from multiple threads.
…triplett
Windows: Synchronize asynchronous pipe reads and writes
On Windows, the pipes used for spawned processes are opened for asynchronous access but `read` and `write` are done using the standard methods that assume synchronous access. This means that the buffer (and variables on the stack) may be read/written to after the function returns.
This PR ensures reads/writes complete before returning. Note that this only applies to pipes we create and does not affect the standard file read/write methods.
Fixesrust-lang#95411
…yn, r=nagisa
Suggest borrowing when trying to coerce unsized type into `dyn Trait`
A helpful error in response to rust-lang#95598, since we can't coerce e.g. `&str` into `&dyn Display`, but we can coerce `&&str` into `&dyn Display` :)
Not sure if the suggestion message needs some help. Let me know, and I can refine this PR.
@rustbotrustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 4, 2022
@rustbotrustbot added the rollup A PR which is a rollup label Apr 4, 2022
@Dylan-DPC

Copy link
Copy Markdown
MemberAuthor

@bors r+ rollup=never p=5

@bors

bors commented Apr 4, 2022

Copy link
Copy Markdown
Collaborator

📌 Commit 0c5f879 has been approved by Dylan-DPC

@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 4, 2022
@bors

bors commented Apr 4, 2022

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 0c5f879 with merge 60e50fc...

@bors

bors commented Apr 4, 2022

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-actions
Approved by: Dylan-DPC
Pushing 60e50fc to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Apr 4, 2022
@bors
bors merged commit 60e50fc into rust-lang:masterApr 4, 2022
@rustbotrustbot added this to the 1.62.0 milestone Apr 4, 2022
@borsbors mentioned this pull request Apr 4, 2022
@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (60e50fc): comparison url.

Summary:

  • Primary benchmarks: no relevant changes found. 6 results were found to be statistically significant but too small to be relevant.
  • Secondary benchmarks: no relevant changes found

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.rollupA PR which is a rollupS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

12 participants

@Dylan-DPC@bors@rust-timer@rustbot@Xaeroxe@cuviper@dtolnay@m-ou-se@ChrisDenton@compiler-errors@emilyalbini@golddranks