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 3 pull requests #127749

Closed
wants to merge 13 commits into from

Commits on Jul 3, 2024

  1. Fill out target-spec metadata for all targets

    Complete the metadata fields for all targets. Cargo will depend on this
    for checking whether a given target supports building the standard
    library.
    harmou01 committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    3b14526 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2024

  1. Configuration menu
    Copy the full SHA
    3a2c0ae View commit details
    Browse the repository at this point in the history
  2. std: deny(unsafe_op_in_unsafe_fn) but allow sites

    This provides a list of locations to hunt down issues in.
    workingjubilee committed Jul 14, 2024
    Configuration menu
    Copy the full SHA
    4572ed6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    87d850d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ce35265 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2024

  1. Configuration menu
    Copy the full SHA
    83a0fe5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    df353a0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    64fb236 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e324602 View commit details
    Browse the repository at this point in the history
  5. Mark some f16 and f128 functions unstably const

    These constifications were blocked on classification functions being
    added. Now that those methods are available, constify them.
    
    This brings things more in line with `f32` and `f64`.
    tgross35 committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    421ca1a View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#127020 - tgross35:f16-f128-classify, r=work…

    …ingjubilee
    
     Add classify and related methods for f16 and f128
    
    Also constify some functions where that was blocked on classify being available.
    
    r? libs
    workingjubilee committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    a45613b View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#127265 - harmou01:dev/harmou01/target-spec-…

    …metadata, r=Nilstrieb
    
    Fill out target-spec metadata for all targets
    
    **What does this PR try to resolve?**
    
    This PR completes the target-spec metadata fields for all targets. This is required for a corresponding Cargo PR which adds a check for whether a target supports building the standard library when the `-Zbuild-std=std` flag is passed ([see this issue](rust-lang/wg-cargo-std-aware#87). This functionality in Cargo is reliant on the output of `--print=target-spec-json`.
    
    **How should we test and review this PR?**
    
    Check that a given target-spec metadata has been updated with:
    ```
    $ ./x.py build library/std
    $ build/host/stage1/bin/rustc --print=target-spec-json --target <target_name> -Zunstable-options
    ```
    
    **Additional Information**
    
    A few things to note:
    * Where a targets 'std' or 'host tools' support is listed as '?' in the rust docs, these are left as 'None' with this PR. The corresponding changes in cargo will only reject an attempt to build std if the 'std' field is 'Some(false)'. In the case it is 'None', cargo will continue trying to build
    * There's no rush for this to be merged. I understand that the format for this is not finalised yet.
    * Related: rust-lang#120745
    workingjubilee committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    8f91841 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#127744 - workingjubilee:deny-unsafe-op-in-s…

    …td, r=jhpratt
    
    std: `#![deny(unsafe_op_in_unsafe_fn)]` in platform-independent code
    
    This applies the `unsafe_op_in_unsafe_fn` lint in all places in std that _do not have platform-specific cfg in their code_. For all such places, the lint remains allowed, because they need further work to address the relevant concerns. This list includes:
    
    - `std::backtrace_rs` (internal-only)
    - `std::sys` (internal-only)
    - `std::os`
    
    Notably this eliminates all "unwrapped" unsafe operations in `std::io` and `std::sync`, which will make them much more auditable in the future. Such has *also* been left for future work. While I made a few safety comments along the way on interfaces I have grown sufficiently familiar with, in most cases I had no context, nor particular confidence the unsafety was correct.
    
    In the cases where I was able to determine the unsafety was correct without having prior context, it was obviously redundant. For example, an unsafe function calling another unsafe function that has the exact same contract, forwarding its caller's requirements just as it forwards its actual call.
    workingjubilee committed Jul 15, 2024
    Configuration menu
    Copy the full SHA
    a6b4ff6 View commit details
    Browse the repository at this point in the history