Remove incorrect newline from float cast suggestion

This commit is contained in:
Esteban Kuber 2021-12-03 01:00:09 +00:00
parent e5038e2099
commit 5b5df0fa17
2 changed files with 11 additions and 11 deletions

View File

@ -1223,7 +1223,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
// Missing try_into implementation for `{integer}` to `{float}`
err.multipart_suggestion_verbose(
&format!(
"{}, producing the floating point representation of the integer,
"{}, producing the floating point representation of the integer, \
rounded if necessary",
cast_msg,
),

View File

@ -994,8 +994,8 @@ error[E0308]: mismatched types
LL | foo::<f64>(x_usize);
| ^^^^^^^ expected `f64`, found `usize`
|
help: you can cast a `usize` to an `f64`, producing the floating point representation of the integer,
| rounded if necessary
help: you can cast a `usize` to an `f64`, producing the floating point representation of the integer, rounded if necessary
|
LL | foo::<f64>(x_usize as f64);
| ++++++
@ -1005,8 +1005,8 @@ error[E0308]: mismatched types
LL | foo::<f64>(x_u64);
| ^^^^^ expected `f64`, found `u64`
|
help: you can cast a `u64` to an `f64`, producing the floating point representation of the integer,
| rounded if necessary
help: you can cast a `u64` to an `f64`, producing the floating point representation of the integer, rounded if necessary
|
LL | foo::<f64>(x_u64 as f64);
| ++++++
@ -1115,8 +1115,8 @@ error[E0308]: mismatched types
LL | foo::<f32>(x_usize);
| ^^^^^^^ expected `f32`, found `usize`
|
help: you can cast a `usize` to an `f32`, producing the floating point representation of the integer,
| rounded if necessary
help: you can cast a `usize` to an `f32`, producing the floating point representation of the integer, rounded if necessary
|
LL | foo::<f32>(x_usize as f32);
| ++++++
@ -1126,8 +1126,8 @@ error[E0308]: mismatched types
LL | foo::<f32>(x_u64);
| ^^^^^ expected `f32`, found `u64`
|
help: you can cast a `u64` to an `f32`, producing the floating point representation of the integer,
| rounded if necessary
help: you can cast a `u64` to an `f32`, producing the floating point representation of the integer, rounded if necessary
|
LL | foo::<f32>(x_u64 as f32);
| ++++++
@ -1137,8 +1137,8 @@ error[E0308]: mismatched types
LL | foo::<f32>(x_u32);
| ^^^^^ expected `f32`, found `u32`
|
help: you can cast a `u32` to an `f32`, producing the floating point representation of the integer,
| rounded if necessary
help: you can cast a `u32` to an `f32`, producing the floating point representation of the integer, rounded if necessary
|
LL | foo::<f32>(x_u32 as f32);
| ++++++