about summary refs log tree commit diff
path: root/src/bootstrap/bootstrap_test.py
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-03-17 00:33:36 +0000
committerbors <bors@rust-lang.org>2025-03-17 00:33:36 +0000
commitc3dd4eefd64da263865f28d4c39d0ef09433d5bf (patch)
tree9e1b22f921a147410f878e894ca5262e560cca8a /src/bootstrap/bootstrap_test.py
parent227690a258492c84ae9927d18289208d0180e62f (diff)
parent7c0726521f61649d3c2192dd36180b2ac489100b (diff)
downloadrust-c3dd4eefd64da263865f28d4c39d0ef09433d5bf.tar.gz
rust-c3dd4eefd64da263865f28d4c39d0ef09433d5bf.zip
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
Diffstat (limited to 'src/bootstrap/bootstrap_test.py')
0 files changed, 0 insertions, 0 deletions