Rollup merge of #91478 - estebank:fix-newline-in-cast-suggestion, r=camelid
Remove incorrect newline from float cast suggestion
This commit is contained in:
commit
f9587b60b6
2 changed files with 11 additions and 11 deletions
|
@ -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,
|
||||
),
|
||||
|
|
|
@ -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);
|
||||
| ++++++
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue