rust/library
bors c3dd4eefd6 Auto merge of #138363 - beetrees:f16-f128-integer-convert, r=Amanieu
Add `From<{integer}>` for `f16`/`f128` impls

This PR adds `impl From<{bool,i8,u8}> for f16` and `impl From<{bool,i8,u8,i16,u16,i32,u32}> for f128`.

The `From<{i64,u64}> for f128` impls are left commented out as adding them would allow using `f128` on stable before it is stabilised like in the following example:
```rust
fn f<T: From<u64>>(x: T) -> T { x }

fn main() {
    let x = f(1.0); // the type of the literal is inferred to be `f128`
}
```
None of the impls added in this PR have this issue as they are all, at minimum, also implemented by `f64`.

This PR will need a crater run for the `From<{i32,u32}>` impls, as `f64` is no longer the only float type to implement them (similar to the cause of #125198).

cc `@bjoernager`
r? `@tgross35`

Tracking issue: #116909
2025-03-17 00:33:36 +00:00
..
alloc Rollup merge of #138303 - DiuDiu777:rc-fix, r=Mark-Simulacrum 2025-03-16 09:40:06 +08:00
alloctests Add comments 2025-03-07 19:11:13 +00:00
backtrace@9d2c34e7e6 Update backtrace 2025-02-13 14:32:50 -08:00
core Auto merge of #138363 - beetrees:f16-f128-integer-convert, r=Amanieu 2025-03-17 00:33:36 +00:00
coretests Rollup merge of #135080 - Enselic:debug-ptr-metadata, r=thomcc 2025-03-16 13:19:51 +08:00
panic_abort Migrate panic_abort to Rust 2024 2025-03-11 09:46:34 -07:00
panic_unwind Migrate panic_unwind to Rust 2024 2025-03-11 09:46:34 -07:00
portable-simd Remove ignored #[must_use] attributes from portable-simd 2025-02-12 13:59:22 +01:00
proc_macro Migrate proc_macro to Rust 2024 2025-03-11 09:46:34 -07:00
profiler_builtins Migrate profiler_builtins to Rust 2024 2025-03-11 09:46:35 -07:00
rtstartup Mark extern blocks as unsafe 2025-02-09 17:11:13 +00:00
rustc-std-workspace-alloc Migrated the rustc-std-workspace crates to Rust 2024 2025-03-11 09:46:35 -07:00
rustc-std-workspace-core Migrated the rustc-std-workspace crates to Rust 2024 2025-03-11 09:46:35 -07:00
rustc-std-workspace-std Migrated the rustc-std-workspace crates to Rust 2024 2025-03-11 09:46:35 -07:00
std Auto merge of #138363 - beetrees:f16-f128-integer-convert, r=Amanieu 2025-03-17 00:33:36 +00:00
stdarch@9426bb5658 Update stdarch 2025-03-06 11:11:55 -08:00
sysroot Migrate the sysroot crate to Rust 2024 2025-03-11 09:46:35 -07:00
test Migrate test to Rust 2024 2025-03-11 09:46:34 -07:00
unwind Rollup merge of #138162 - ehuss:library-2024, r=cuviper 2025-03-13 10:58:21 +01:00
windows_targets Migrate windows-targets to Rust 2024 2025-03-11 09:46:35 -07:00
Cargo.lock Rollup merge of #135080 - Enselic:debug-ptr-metadata, r=thomcc 2025-03-16 13:19:51 +08:00
Cargo.toml Move all alloc integration tests to a new alloctests crate 2025-03-07 19:11:11 +00:00