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 7 pull requests #118996

Merged
merged 17 commits into from
Dec 15, 2023
Merged

Rollup of 7 pull requests #118996

merged 17 commits into from
Dec 15, 2023

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

tgross35 and others added 17 commits December 5, 2023 14:49
Make the following API stable:

    // in core::any
    pub fn type_name_of_val<T: ?Sized>(_val: &T) -> &'static str

Const stability is not added because this relies on `type_name` which is also
not const. That has a blocking issue.

Fixes rust-lang#66359
I've been inactive around diagnostics for a while so would like to remove myself from the diagnostics-related ping groups for now.
…dtolnay

Stabilize `ptr::{from_ref, from_mut}`

I propose to stabilize the following APIs:

```rust
// mod core::ptr

pub const fn from_ref<T: ?Sized>(r: &T) -> *const T;
pub const fn from_mut<T: ?Sized>(r: &mut T) -> *mut T;
```

Tracking issue: rust-lang#106116

---

``@RalfJung`` what do you think we should do with `from_mut`? Stabilize it as const, given that you can't call it anyway (no way to get `&mut` in `const fn`)? Defer stabilizing it as const leaving the same issue/feature? Change issue/feature? Change issue/feature to the "`&mut` in const fn" one?
…lnay

Stabilize `type_name_of_val`

Make the following API stable:

```rust
// in core::any
pub fn type_name_of_val<T: ?Sized>(_val: &T) -> &'static str
```

This is a convenience method to get the type name of a value, as opposed to `type_name` that takes a type as a generic.

Const stability is not added because this relies on `type_name` which is also not const. That has a blocking issue rust-lang#97156.

Wording was also changed to direct most of the details to `type_name` so we don't have as much duplicated documentation.

Fixes tracking issue rust-lang#66359.

There were two main concerns in the tracking issue:

1. Naming: `type_name_of` and `type_name_of_val` seem like the only mentioned options. Differences in opinion here come from `std::mem::{size_of, align_of, size_of_val, align_of_val}`. This PR leaves the name as `type_name_of_val`, but I can change if desired since it is pretty verbose.
2. What this displays for `&dyn`: I don't think that having `type_name_of_val` function resolve those is worth the headache it would be, see rust-lang#66359 (comment) for some workarounds. I also amended the docs wording to leave it open-ended, in case we have means to change that behavior in the future.

``@rustbot`` label -T-libs +T-libs-api +needs-fcp
r? libs-api
Move type relations into submodule `relate` in rustc_infer, and notify when it has changed

r? lcnr
… r=notriddle

Simplify `src-script.js` code

Instead of keeping this value in the global scope and still use it in the function in case it wasn't used outside, let's just use it inside the function.

r? ``@notriddle``
…compiler-errors

Remove @JohnTitor from diagnostics pings

I've been inactive around diagnostics for a while so would like to remove myself from the diagnostics-related ping groups for now.
… r=notriddle

Simplify JS code a little bit

As mentioned, JS code can be simplified a little bit.

r? ``@notriddle``
…illaumeGomez

rustdoc: add regression test for JS data file loading

Follow up for rust-lang#118961
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Dec 15, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=7

@bors
Copy link
Contributor

bors commented Dec 15, 2023

📌 Commit 5fc9ff5 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 Dec 15, 2023
@bors
Copy link
Contributor

bors commented Dec 15, 2023

⌛ Testing commit 5fc9ff5 with merge a96d57b...

@bors
Copy link
Contributor

bors commented Dec 15, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 15, 2023
@bors bors merged commit a96d57b into rust-lang:master Dec 15, 2023
12 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Dec 15, 2023
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#117824 Stabilize ptr::{from_ref, from_mut} 4cf5fc95bd68c2fde66b7675b169de4ddf80b6fd (link)
#118234 Stabilize type_name_of_val 52cc7c018d0f3de8c50d8110273b7d1a720cf281 (link)
#118944 Move type relations into submodule relate in rustc_infer,… 8d2c24917be93a4e9d9b18a0475d4e74a2a71b51 (link)
#118977 Simplify src-script.js code e73670b12c3989fc49dce7734b9d5a8587056e03 (link)
#118985 Remove @JohnTitor from diagnostics pings f2bade42d3e127ca3ef436578b966961c551dd57 (link)
#118986 Simplify JS code a little bit 30b613d520965f462df56e0276376ad380b67a39 (link)
#118988 rustdoc: add regression test for JS data file loading eced3b63339deb95e5fb0e06daa770ba5e96b1d9 (link)

previous master: 3f39cae119

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 (a96d57b): 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)

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

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

Binary size

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

Bootstrap: 671.537s -> 671.894s (0.05%)
Artifact size: 312.53 MiB -> 312.51 MiB (-0.00%)

@matthiaskrgr matthiaskrgr deleted the rollup-n6x2lc7 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-meta Area: Issues & PRs about the rust-lang/rust repository itself 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants