Skip to content

Commit

Permalink
Auto merge of rust-lang#123846 - matthiaskrgr:rollup-85y28av, r=matth…
Browse files Browse the repository at this point in the history
…iaskrgr

Rollup of 3 pull requests

Successful merges:

 - rust-lang#123796 (Remove unused cargo-platform dependency from tidy)
 - rust-lang#123830 (Remove `From` impls for unstable types that break inference)
 - rust-lang#123842 (fix typo in pin.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Apr 12, 2024
2 parents 7bdae13 + e256d5f commit bd71213
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
1 change: 0 additions & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5579,7 +5579,6 @@ dependencies = [
name = "tidy"
version = "0.1.0"
dependencies = [
"cargo-platform",
"cargo_metadata 0.15.4",
"ignore",
"lazy_static",
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/convert/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ impl_from!(u16 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0"
impl_from!(u32 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);

// float -> float
impl_from!(f16 => f32, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
impl_from!(f16 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
// FIXME(f16_f128): adding additional `From` impls for existing types breaks inference. See
// <https://github.com/rust-lang/rust/issues/123824>
impl_from!(f16 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
impl_from!(f32 => f64, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
impl_from!(f32 => f128, #[stable(feature = "lossless_float_conv", since = "1.6.0")]);
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/pin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ impl<Ptr: Deref<Target: Unpin>> Pin<Ptr> {
/// Unwraps this `Pin<Ptr>`, returning the underlying pointer.
///
/// Doing this operation safely requires that the data pointed at by this pinning pointer
/// implemts [`Unpin`] so that we can ignore the pinning invariants when unwrapping it.
/// implements [`Unpin`] so that we can ignore the pinning invariants when unwrapping it.
///
/// # Examples
///
Expand Down
1 change: 0 additions & 1 deletion src/tools/tidy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ autobins = false

[dependencies]
cargo_metadata = "0.15"
cargo-platform = "0.1.2"
regex = "1"
miropt-test-tools = { path = "../miropt-test-tools" }
lazy_static = "1"
Expand Down
9 changes: 9 additions & 0 deletions tests/ui/inference/untyped-primitives.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//@ check-pass
// issue: rust-lang/rust#123824
// This test is a sanity check and does not enforce any stable API, so may be
// removed at a future point.

fn main() {
let x = f32::from(3.14);
let y = f64::from(3.14);
}

0 comments on commit bd71213

Please sign in to comment.