-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #89770 - jkugelman:must-use-from-and-into, r=joshtriplett
Add #[must_use] to From::from and Into::into Risk of churn: **High** Magic 8-Ball says: **Outlook not so good** I figured I'd put this out there. If we don't do it now maybe we save it for a rainy day. Parent issue: #89692 r? `@joshtriplett`
- Loading branch information
Showing
9 changed files
with
154 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/ui/never_type/never-value-fallback-issue-66757.nofallback.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,70 @@ | ||
error: casting `i8` to `f32` may become silently lossy if you later change the type | ||
--> $DIR/cast_lossless_float.rs:9:5 | ||
--> $DIR/cast_lossless_float.rs:9:13 | ||
| | ||
LL | x0 as f32; | ||
| ^^^^^^^^^ help: try: `f32::from(x0)` | ||
LL | let _ = x0 as f32; | ||
| ^^^^^^^^^ help: try: `f32::from(x0)` | ||
| | ||
= note: `-D clippy::cast-lossless` implied by `-D warnings` | ||
|
||
error: casting `i8` to `f64` may become silently lossy if you later change the type | ||
--> $DIR/cast_lossless_float.rs:10:5 | ||
--> $DIR/cast_lossless_float.rs:10:13 | ||
| | ||
LL | x0 as f64; | ||
| ^^^^^^^^^ help: try: `f64::from(x0)` | ||
LL | let _ = x0 as f64; | ||
| ^^^^^^^^^ help: try: `f64::from(x0)` | ||
|
||
error: casting `u8` to `f32` may become silently lossy if you later change the type | ||
--> $DIR/cast_lossless_float.rs:12:5 | ||
--> $DIR/cast_lossless_float.rs:12:13 | ||
| | ||
LL | x1 as f32; | ||
| ^^^^^^^^^ help: try: `f32::from(x1)` | ||
LL | let _ = x1 as f32; | ||
| ^^^^^^^^^ help: try: `f32::from(x1)` | ||
|
||
error: casting `u8` to `f64` may become silently lossy if you later change the type | ||
--> $DIR/cast_lossless_float.rs:13:5 | ||
--> $DIR/cast_lossless_float.rs:13:13 | ||
| | ||
LL | x1 as f64; | ||
| ^^^^^^^^^ help: try: `f64::from(x1)` | ||
LL | let _ = x1 as f64; | ||
| ^^^^^^^^^ help: try: `f64::from(x1)` | ||
|
||
error: casting `i16` to `f32` may become silently lossy if you later change the type | ||
--> $DIR/cast_lossless_float.rs:15:5 | ||
--> $DIR/cast_lossless_float.rs:15:13 | ||
| | ||
LL | x2 as f32; | ||
| ^^^^^^^^^ help: try: `f32::from(x2)` | ||
LL | let _ = x2 as f32; | ||
| ^^^^^^^^^ help: try: `f32::from(x2)` | ||
|
||
error: casting `i16` to `f64` may become silently lossy if you later change the type | ||
--> $DIR/cast_lossless_float.rs:16:5 | ||
--> $DIR/cast_lossless_float.rs:16:13 | ||
| | ||
LL | x2 as f64; | ||
| ^^^^^^^^^ help: try: `f64::from(x2)` | ||
LL | let _ = x2 as f64; | ||
| ^^^^^^^^^ help: try: `f64::from(x2)` | ||
|
||
error: casting `u16` to `f32` may become silently lossy if you later change the type | ||
--> $DIR/cast_lossless_float.rs:18:5 | ||
--> $DIR/cast_lossless_float.rs:18:13 | ||
| | ||
LL | x3 as f32; | ||
| ^^^^^^^^^ help: try: `f32::from(x3)` | ||
LL | let _ = x3 as f32; | ||
| ^^^^^^^^^ help: try: `f32::from(x3)` | ||
|
||
error: casting `u16` to `f64` may become silently lossy if you later change the type | ||
--> $DIR/cast_lossless_float.rs:19:5 | ||
--> $DIR/cast_lossless_float.rs:19:13 | ||
| | ||
LL | x3 as f64; | ||
| ^^^^^^^^^ help: try: `f64::from(x3)` | ||
LL | let _ = x3 as f64; | ||
| ^^^^^^^^^ help: try: `f64::from(x3)` | ||
|
||
error: casting `i32` to `f64` may become silently lossy if you later change the type | ||
--> $DIR/cast_lossless_float.rs:21:5 | ||
--> $DIR/cast_lossless_float.rs:21:13 | ||
| | ||
LL | x4 as f64; | ||
| ^^^^^^^^^ help: try: `f64::from(x4)` | ||
LL | let _ = x4 as f64; | ||
| ^^^^^^^^^ help: try: `f64::from(x4)` | ||
|
||
error: casting `u32` to `f64` may become silently lossy if you later change the type | ||
--> $DIR/cast_lossless_float.rs:23:5 | ||
--> $DIR/cast_lossless_float.rs:23:13 | ||
| | ||
LL | x5 as f64; | ||
| ^^^^^^^^^ help: try: `f64::from(x5)` | ||
LL | let _ = x5 as f64; | ||
| ^^^^^^^^^ help: try: `f64::from(x5)` | ||
|
||
error: casting `f32` to `f64` may become silently lossy if you later change the type | ||
--> $DIR/cast_lossless_float.rs:26:5 | ||
--> $DIR/cast_lossless_float.rs:26:13 | ||
| | ||
LL | 1.0f32 as f64; | ||
| ^^^^^^^^^^^^^ help: try: `f64::from(1.0f32)` | ||
LL | let _ = 1.0f32 as f64; | ||
| ^^^^^^^^^^^^^ help: try: `f64::from(1.0f32)` | ||
|
||
error: aborting due to 11 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.