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 8 pull requests #118995

Closed
wants to merge 17 commits into from

Commits on Dec 5, 2023

  1. Stabilize type_name_of_val

    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
    tgross35 committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    b225aab View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2023

  1. Configuration menu
    Copy the full SHA
    552143c View commit details
    Browse the repository at this point in the history
  2. 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.
    JohnTitor authored Dec 15, 2023
    Configuration menu
    Copy the full SHA
    c3dd266 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    028a313 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6bbbff5 View commit details
    Browse the repository at this point in the history
  5. Stabilize ptr::{from_ref, from_mut}

    WaffleLapkin authored and dtolnay committed Dec 15, 2023
    Configuration menu
    Copy the full SHA
    b863e9b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5b0b7cd View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    18bf0ca View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    807cd85 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0184c76 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#117824 - WaffleLapkin:ptr_from_ref_stab, r=…

    …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?
    matthiaskrgr authored Dec 15, 2023
    Configuration menu
    Copy the full SHA
    9c0083c View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#118234 - tgross35:type_name_of_value, r=dto…

    …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
    matthiaskrgr authored Dec 15, 2023
    Configuration menu
    Copy the full SHA
    6fa369d View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#118944 - compiler-errors:relate, r=lcnr

    Move type relations into submodule `relate` in rustc_infer, and notify when it has changed
    
    r? lcnr
    matthiaskrgr authored Dec 15, 2023
    Configuration menu
    Copy the full SHA
    f80d5c3 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#118977 - GuillaumeGomez:simplifysrc-script,…

    … 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`
    matthiaskrgr authored Dec 15, 2023
    Configuration menu
    Copy the full SHA
    7b08d99 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#118985 - JohnTitor:rm-jtitor-diag-pings, r=…

    …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.
    matthiaskrgr authored Dec 15, 2023
    Configuration menu
    Copy the full SHA
    d1f0f47 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#118986 - GuillaumeGomez:simplify-js-inline,…

    … r=notriddle
    
    Simplify JS code a little bit
    
    As mentioned, JS code can be simplified a little bit.
    
    r? `@notriddle`
    matthiaskrgr authored Dec 15, 2023
    Configuration menu
    Copy the full SHA
    b9d5ff7 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#118988 - notriddle:notriddle/varconst, r=Gu…

    …illaumeGomez
    
    rustdoc: add regression test for JS data file loading
    
    Follow up for rust-lang#118961
    matthiaskrgr authored Dec 15, 2023
    Configuration menu
    Copy the full SHA
    7587b05 View commit details
    Browse the repository at this point in the history