Skip to content

Rollup of 12 pull requests #122444

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

Closed
wants to merge 44 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

chriswailes and others added 30 commits February 16, 2024 14:44
This adds the unstable `-Z external-clangrt` flag that will prevent
rustc from emitting linker paths for the in-tree LLVM sanitizer runtime
library.
This means `DiagCtxtInner::emit_diagnostic` can return its result
directly, rather than having to modify a local variable.
It has a single call site, and this will enable subsequent refactorings.
It results in a tiny bit of duplication (another
`self.treat_next_err_as_bug()` condition) but I think it's worth it to
get more code into the main `match`.
This will enable additional refactorings.
Note that `self.suppressed_expected_diag` is no longer set for
`ForceWarning`, which is good. Nor is `TRACK_DIAGNOSTIC` called for
`Allow`, which is also good.
Also add an assertion for the levels allowed with `has_future_breakage`.
This match is complex enough that it's a good idea to enumerate every
variant.

This also means `can_be_top_or_sub` can just be `can_be_subdiag`.
- Replace some nested if-let with let-chains
- Tweak a match pattern to allow shorthand struct syntax
- Fuse an `is_empty` check with getting the last element
- Merge some common code that emits `MalformedAttribute` and continues
- Format `"{tool}::{name}"` in a way that's consistent with other match arms
- Replace if-let-else-panic with let-else
- Use early-exit to flatten a method body
The header `ignore-unix` is already allowed. Also extend tests.
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
`WrappingRange::is_full` computation assumed that to be full the range
couldn't wrap, which is not necessarily true.

For example, a range of 1..=0 is a valid representation of a full
wrapping range.
The old name came from a time where I wanted to reuse it for
differentiating wildcards from bindings. I don't plan to do this
anymore.
Various style improvements to `rustc_lint::levels`

While reading this file, I noticed a few opportunities to make things a little nicer:

- Replace some nested if-let with let-chains
- Tweak a match pattern to allow shorthand struct syntax
- Fuse an `is_empty` check with getting the last element
- Merge some common code that emits `MalformedAttribute` and continues
- Format `"{tool}::{name}"` in a way that's consistent with other match arms
- Replace if-let-else-panic with let-else
- Use early-exit to flatten a method body

Some of these changes cause indentation churn, so ignoring whitespace is recommended.
compiletest: Allow `only-unix` in test headers

The header `ignore-unix` is already allowed. Also extend tests.

This is needed by rust-lang#121573 which I am splitting up into smaller and more digestible PRs.
Increase timeout for new bors bot

2 hours isn't enough even to run an uncached try build.. :)

r? `@Mark-Simulacrum`
Fix StableMIR `WrappingRange::is_full` computation

`WrappingRange::is_full` computation assumed that to be full the range couldn't wrap, which is not necessarily true.

For example, a range of 1..=0 is a valid representation of a full wrapping range.
…KO8Ki

Generate link to `Local` in `hir::Let` documentation

This PR adds a missing link generation to `Local` type.
pattern analysis: rename a few types

A few long overdue renames. `ValidityConstraint` was supposed to serve double purpose but I don't need that anymore. I don't know what I was thinking with `TypeCx` I think I was trying to be clever. That's fixed now 😄

r? `@compiler-errors`
…-errors

pattern analysis: remove `MaybeInfiniteInt::JustAfterMax`

It was inherited from before half-open ranges, but it doesn't pull its weight anymore. We lose a tiny bit of diagnostic precision as can be seen in the test. I'm generally in favor of half-open ranges over explicit `x..=MAX` ranges anyway.
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc 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 Mar 13, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=12

@bors
Copy link
Collaborator

bors commented Mar 13, 2024

📌 Commit 49f0d18 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 13, 2024
@bors
Copy link
Collaborator

bors commented Mar 13, 2024

⌛ Testing commit 49f0d18 with merge 2dae8fa...

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 13, 2024
…iaskrgr

Rollup of 12 pull requests

Successful merges:

 - rust-lang#104353 (Add CStr::bytes iterator)
 - rust-lang#120699 (Document `TRACK_DIAGNOSTIC` calls.)
 - rust-lang#121207 (Add `-Z external-clangrt`)
 - rust-lang#122397 (Various cleanups around the const eval query providers)
 - rust-lang#122416 (Various style improvements to `rustc_lint::levels`)
 - rust-lang#122422 (compiletest: Allow `only-unix` in test headers)
 - rust-lang#122424 (fix: typos)
 - rust-lang#122425 (Increase timeout for new bors bot)
 - rust-lang#122426 (Fix StableMIR `WrappingRange::is_full` computation)
 - rust-lang#122430 (Generate link to `Local` in `hir::Let` documentation)
 - rust-lang#122434 (pattern analysis: rename a few types)
 - rust-lang#122437 (pattern analysis: remove `MaybeInfiniteInt::JustAfterMax`)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job armhf-gnu failed! Check out the build log: (web) (plain)

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

---- [ui] tests/ui/rfcs/rfc-2091-track-caller/pass.rs#default stdout ----

error in revision `default`: test run failed!
command: RUST_TEST_THREADS="8" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/remote-test-client" "run" "0" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2091-track-caller/pass.default/a"
--- stdout -------------------------------
--- stdout -------------------------------
uploaded "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rfcs/rfc-2091-track-caller/pass.default/a", waiting for result
--- stderr -------------------------------
thread 'main' panicked at src/tools/remote-test-client/src/main.rs:310:9:
client.read_exact(&mut header) failed with Connection reset by peer (os error 104)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

@bors
Copy link
Collaborator

bors commented Mar 13, 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 Mar 13, 2024
@matthiaskrgr
Copy link
Member Author

@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 Mar 13, 2024
@klensy
Copy link
Contributor

klensy commented Mar 13, 2024

#121207 pushed after r+

@matthiaskrgr matthiaskrgr deleted the rollup-jf146j9 branch March 16, 2024 18:19
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc 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.