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 13 pull requests #121078

Merged
merged 32 commits into from
Feb 14, 2024
Merged

Rollup of 13 pull requests #121078

merged 32 commits into from
Feb 14, 2024

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Feb 14, 2024

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

trevyn and others added 30 commits February 9, 2024 20:47
This is intended to clarify:

* That `Wake` exists and can be used instead of `RawWaker`.
* How to construct a `Waker` when you are looking at `Wake`
  (which was previously only documented in the example).
Introducing a new config for this purpose as NetBSD 9 or 8 will be still around
for a good while. For now, we re finally enabling sys::unix::rand::getrandom.
when param type has default
and type in trait is generic.
The previous definition (accidentally) disallowed the implementation of
stack-based allocators whose memory would become invalid once the
lifetime of the allocator type ended.

This also ensures the validity of the following blanket implementation:
```rust
impl<A: Allocator> Allocator for &'_ A {}
```
Once we have emitted at least one error, delayed bugs won't be used. So
we can (a) we can (a) discard any existing delayed bugs, and (b) stop
recording any new delayed bugs.

This eliminates a longstanding `FIXME` comment. There should be no
soundness issues because it's not possible to un-emit an error.
For some cases where it's clear that an error has already occurred,
e.g.:
- there's a comment stating exactly that, or
- things like HIR lowering, where we are lowering an error kind

The commit also tweaks some comments around delayed bug sites.
Additional doc links and explanation of `Wake`.

This is intended to clarify:

* That `Wake` exists and can be used instead of `RawWaker`.
* How to construct a `Waker` when you are looking at `Wake` (which was previously only documented in the example).
…-Simulacrum

Clarify the lifetimes of allocations returned by the `Allocator` trait

The previous definition (accidentally) disallowed the implementation of stack-based allocators whose memory would become invalid once the lifetime of the allocator type ended.

This also ensures the validity of the following blanket implementation:
```rust
impl<A: Allocator> Allocator for &'_ A {}
```
Uplift `TypeVisitableExt` into `rustc_type_ir`

This uplifts `TypeVisitableExt` into `rustc_type_ir` so it can be used in an interner-agnostic way. It also moves some `TypeSuperVisitable` bounds onto `Interner` since we don't expect to support libraries that have types which aren't foldable by default.

This restores a couple of asserts in the canonicalizer code we uplifted, and also makes it so that we can use type-flags-based helpers in the solver code, which I'm interested in uplifting.

r? lcnr
…rors

Be less confident when `dyn` suggestion is not checked for object safety

rust-lang#120275 no longer checks bare traits for object safety when making a `dyn` suggestion on Rust < 2021. In this case, qualify the suggestion with a note that the trait must be object safe, to prevent user confusion as seen in rust-lang#116434

r? ```@fmease```
Fix suggestion span for `?Sized` when param type has default

Fixes rust-lang#120878

Diagnostic suggests adding `: ?Sized` in an incorrect place if a type parameter default is present

r? `@fmease`
…-obk

Optimize `delayed_bug` handling.

Once we have emitted at least one error, delayed bugs won't be used. So we can (a) we can (a) discard any existing delayed bugs, and (b) stop recording any new delayed bugs.

This eliminates a longstanding `FIXME` comment. There should be no soundness issues because it's not possible to un-emit an error.

r? `@oli-obk`
…=scottmcm

implement `Default` for `AsciiChar`

This implements `Default` for `AsciiChar` in order to match `char`'s implementation.

From all the different possible ways to do this I think the clearest one is to have both `char` and `AsciiChar` impls together.

I've also updated the doc-comment of the default variant since rustdoc doesn't seem to indicate it otherwise. Probably the text could be improved, though. I couldn't find any similar examples in the codebase and suggestions are welcomed.

r? `@scottmcm`
…rors

Correctly compute adjustment casts in GVN

Fixes rust-lang#120925

r? `@oli-obk`
Fix two UI tests with incorrect directive / invalid revision

- `tests/ui/borrowck/copy-suggestion-region-vid.rs` had a `ui_test`-style directive on compiletest: `//`@run-rustfix`.`
- `tests/ui/asm/inline-syntax.rs` has directives for a undeclared revision `[x86_64_allowed]` which seems to have the same directives as declared revision `[x86_64]`.
Do not point at `#[allow(_)]` as the reason for compat lint triggering

Fix rust-lang#121009.
…oli-obk

Use fewer delayed bugs.

For some cases where it's clear that an error has already occurred, e.g.:
- there's a comment stating exactly that, or
- things like HIR lowering, where we are lowering an error kind

The commit also tweaks some comments around delayed bug sites.

r? `@oli-obk`
@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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 Feb 14, 2024
@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 14, 2024

@bors r+ p=13

@bors
Copy link
Contributor

bors commented Feb 14, 2024

📌 Commit 96635da has been approved by oli-obk

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 Feb 14, 2024
@bors
Copy link
Contributor

bors commented Feb 14, 2024

⌛ Testing commit 96635da with merge 340bb19...

@bors
Copy link
Contributor

bors commented Feb 14, 2024

☀️ Test successful - checks-actions
Approved by: oli-obk
Pushing 340bb19 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 14, 2024
@bors bors merged commit 340bb19 into rust-lang:master Feb 14, 2024
12 checks passed
@rustbot rustbot added this to the 1.78.0 milestone Feb 14, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#116387 Additional doc links and explanation of Wake. 3f91f607caac2cfcb81d32e4bdfc695d07a46714 (link)
#118738 Netbsd10 update d1395abb1e0148a5b718663550d2891dc85c8ad5 (link)
#118890 Clarify the lifetimes of allocations returned by the `Alloc… c7bef8e1d6afa136510a3559b8466884da76f58b (link)
#120498 Uplift TypeVisitableExt into rustc_type_ir 9df736bc4a0ff980248ab218b569c51209e963d4 (link)
#120530 Be less confident when dyn suggestion is not checked for … 733ed821bf4310f94cc92b57f35db3659208df39 (link)
#120915 Fix suggestion span for ?Sized when param type has default 4444ad26a9d701ef62f1eed586f43eecc57d80f1 (link)
#121015 Optimize delayed_bug handling. f80659dd6fbfb5a457b9a61b84cfce2526737b62 (link)
#121024 implement Default for AsciiChar 90a081ecbab6ecb48e8443e85818ad1df42e7be9 (link)
#121039 Correctly compute adjustment casts in GVN 39875bdb0d8efe42d1c6baf766f2c91a3bf20639 (link)
#121045 Fix two UI tests with incorrect directive / invalid revision aa34421a9bb6b57ec6777aa8c95b8d1488351f95 (link)
#121049 Do not point at #[allow(_)] as the reason for compat lint… e16d7c085361593dc568e38ec623f186461b55cf (link)
#121071 Use fewer delayed bugs. ad0cc6ca14fb83a0950d464a3cede29035088751 (link)
#121073 Fix typos in OneLock doc c715155985afd72b69519a4f785807a6221e8ac2 (link)

previous master: 81b757c670

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 (340bb19): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

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

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: 633.405s -> 634.148s (0.12%)
Artifact size: 306.10 MiB -> 306.07 MiB (-0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) merged-by-bors This PR was explicitly merged by bors. O-unix Operating system: Unix-like 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.