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 #120157

Merged
merged 27 commits into from
Jan 20, 2024
Merged

Rollup of 10 pull requests #120157

merged 27 commits into from
Jan 20, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

the8472 and others added 27 commits June 29, 2023 01:55
old:
    ascii::bench_ascii_escape_display_mixed      17.97µs/iter +/- 204.00ns
    ascii::bench_ascii_escape_display_no_escape 545.00ns/iter   +/- 6.00ns
new:
    ascii::bench_ascii_escape_display_mixed      4.99µs/iter +/- 56.00ns
    ascii::bench_ascii_escape_display_no_escape 91.00ns/iter  +/- 1.00ns
…tc_infer using callback.

Pass each obligation to an fn callback with its respective inference context. This avoids needing to keep around copies of obligations or inference contexts.

Specify usability of inspect_typeck in comment.
…lacrum,dtolnay

Added NonZeroXxx::from_mut(_unchecked)?

ACP: rust-lang/libs-team#129
Tracking issue: rust-lang#106290
…imulacrum

optimize EscapeAscii's Display  and CStr's Debug

```
old:
    ascii::bench_ascii_escape_display_mixed      17.97µs/iter +/- 204.00ns
    ascii::bench_ascii_escape_display_no_escape 545.00ns/iter   +/- 6.00ns
new:
    ascii::bench_ascii_escape_display_mixed      4.99µs/iter +/- 56.00ns
    ascii::bench_ascii_escape_display_no_escape 91.00ns/iter  +/- 1.00ns
```
…wesleywiser

Stabilize single-field offset_of

This PR stabilizes offset_of for a single field. There has been some further discussion at rust-lang#106655 about whether this is advisable; I'm opening the PR anyway so that the code is available.
Expose Obligations created during type inference.

This PR is a first pass at exposing the trait obligations generated and solved for during the type-check progress. Exposing these obligations allows for rustc plugins to use the public interface for proof trees (provided by the next gen trait solver).

The changes proposed track *all* obligations during the type-check process, this is desirable to not only look at the trees of failed obligations, but also those of successfully proved obligations. This feature is placed behind an unstable compiler option `track-trait-obligations` which should be used together with the `next-solver` option. I should note that the main interface is the function `inspect_typeck` made public in `rustc_hir_typeck/src/lib.rs` which allows the caller to provide a callback granting access to the `FnCtxt`.

r? `@lcnr`
Avoid ICEs in trait names without `dyn`

Check diagnostic is error before downgrading. Fix rust-lang#119633.

 Account for traits using self-trait by name without `dyn`. Fix rust-lang#119652.
…acrum

Teach tidy about line/col information for malformed features

This makes it significantly easier to find the specific feature, since you can now just click it in the command line of your IDE
SMIR: Make the remaining "private" fields actually private

Turns out we have already created a trait that allows us to make the fields private: https://doc.rust-lang.org/nightly/nightly-rustc/stable_mir/ty/trait.IndexedVal.html

fixes rust-lang/project-stable-mir#56

r? `@celinval`
`single_use_lifetimes`: Don't suggest deleting lifetimes with bounds

Closes rust-lang#117965

```
9 |     pub fn get<'b: 'a>(&'b self) -> &'a str {
  |                ^^       -- ...is used only here
  |                |
  |                this lifetime...
```

In this example, I think the `&'b self` can be replaced with the bound itself, yielding `&'a self`, but this would require a deeper refactor. Happy to do as a follow-on PR if desired.
…es-even, r=cuviper

Stabilize `round_ties_even`

Closes  rust-lang#96710

`@rustbot` label -T-libs T-libs-api
…moting, r=aliemjay

Don't use `ReErased` to detect type test promotion failed

Using `ReErased` here is convenient because it implicitly stores the state that we are explicitly recording with the `failed` variable now, but I also think it adds a tiny bit of complexity that is not worth it.

r? `@aliemjay`
@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) labels Jan 20, 2024
@rustbot rustbot added 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Jan 20, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Jan 20, 2024

📌 Commit bb816e6 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 Jan 20, 2024
@bors
Copy link
Contributor

bors commented Jan 20, 2024

⌛ Testing commit bb816e6 with merge 13d2fe2...

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

Rollup of 10 pull requests

Successful merges:

 - rust-lang#103730 (Added NonZeroXxx::from_mut(_unchecked)?)
 - rust-lang#113142 (optimize EscapeAscii's Display  and CStr's Debug)
 - rust-lang#118799 (Stabilize single-field offset_of)
 - rust-lang#119613 (Expose Obligations created during type inference.)
 - rust-lang#119752 (Avoid ICEs in trait names without `dyn`)
 - rust-lang#120132 (Teach tidy about line/col information for malformed features)
 - rust-lang#120135 (SMIR: Make the remaining "private" fields actually private)
 - rust-lang#120148 (`single_use_lifetimes`: Don't suggest deleting lifetimes with bounds)
 - rust-lang#120150 (Stabilize `round_ties_even`)
 - rust-lang#120155 (Don't use `ReErased` to detect type test promotion failed)

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

A job 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 Jan 20, 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 Jan 20, 2024
@matthiaskrgr
Copy link
Member Author

@bors retry curl: (35) Recv failure: Connection reset by peer

@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 Jan 20, 2024
@bors
Copy link
Contributor

bors commented Jan 20, 2024

⌛ Testing commit bb816e6 with merge 314384b...

@bors
Copy link
Contributor

bors commented Jan 20, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 314384b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 20, 2024
@bors bors merged commit 314384b into rust-lang:master Jan 20, 2024
12 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 20, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#103730 Added NonZeroXxx::from_mut(_unchecked)? 628b151a4a8f2761e7b9203bb36509544e5b489f (link)
#113142 optimize EscapeAscii's Display and CStr's Debug dc17111fa61b3779d92795b5eca37aad1fb5be6a (link)
#118799 Stabilize single-field offset_of 9d1e4bc7b109735dad619386b6c6d5a386a79ed8 (link)
#119613 Expose Obligations created during type inference. dde3f2b49ccbb542b4eaeedf40f66950c4fe987d (link)
#119752 Avoid ICEs in trait names without dyn 5ecefba10925aafc1262f018347119b752b5a2d9 (link)
#120132 Teach tidy about line/col information for malformed features 9d7b279fc96f99818dc12e186cab971b10b6acaa (link)
#120135 SMIR: Make the remaining "private" fields actually private b1252df4d8ee1ac14028fbd8019bcd2da331fa2e (link)
#120148 single_use_lifetimes: Don't suggest deleting lifetimes wi… b7248c7d8371d451cb3c1a595f304083f4a6986e (link)
#120150 Stabilize round_ties_even 28e2f94e304f445ab752b700509d0889d2f98722 (link)
#120155 Don't use ReErased to detect type test promotion failed aae9d5c38b91e33d5cb4fd004e8e5666ade12684 (link)

previous master: 5378c1cf07

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 (314384b): 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.4% [0.4%, 0.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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)
1.6% [1.2%, 2.5%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.2% [-3.2%, -3.2%] 1
All ❌✅ (primary) - - 0

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: 663.642s -> 665.922s (0.34%)
Artifact size: 308.33 MiB -> 308.32 MiB (-0.00%)

@matthiaskrgr matthiaskrgr deleted the rollup-f0p3wkk branch March 16, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc 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-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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.