-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Rollup of 7 pull requests #118996
Conversation
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
@bors r+ rollup=never p=7 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 3f39cae119 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (a96d57b): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 671.537s -> 671.894s (0.05%) |
Successful merges:
ptr::{from_ref, from_mut}
#117824 (Stabilizeptr::{from_ref, from_mut}
)type_name_of_val
#118234 (Stabilizetype_name_of_val
)relate
in rustc_infer, and notify when it has changed #118944 (Move type relations into submodulerelate
in rustc_infer, and notify when it has changed)src-script.js
code #118977 (Simplifysrc-script.js
code)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup