rust/tests/ui/pattern/usefulness/floats.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

147 lines
4.0 KiB
Plaintext
Raw Normal View History

error[E0004]: non-exhaustive patterns: `_` not covered
--> $DIR/floats.rs:11:11
|
2019-03-09 06:03:44 -06:00
LL | match 0.0 {
| ^^^ pattern `_` not covered
|
= note: the matched value is of type `f64`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
2023-09-29 11:33:07 -05:00
LL ~ 0.0..=1.0 => {},
LL + _ => todo!()
|
2020-11-20 13:03:56 -06:00
error: unreachable pattern
--> $DIR/floats.rs:18:9
2020-11-20 13:03:56 -06:00
|
LL | 0.01f16..=6.5f16 => {}
| ---------------- matches all the relevant values
LL | 0.01f16 => {}
| ^^^^^^^ no value can reach this
2020-11-20 13:03:56 -06:00
|
note: the lint level is defined here
2024-04-27 19:35:32 -05:00
--> $DIR/floats.rs:1:9
2020-11-20 13:03:56 -06:00
|
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
2023-09-29 11:33:07 -05:00
error: unreachable pattern
--> $DIR/floats.rs:19:9
|
LL | 0.01f16..=6.5f16 => {}
| ---------------- matches all the relevant values
LL | 0.01f16 => {}
LL | 0.02f16 => {}
| ^^^^^^^ no value can reach this
error: unreachable pattern
--> $DIR/floats.rs:20:9
|
LL | 0.01f16..=6.5f16 => {}
| ---------------- matches all the relevant values
...
LL | 6.5f16 => {}
| ^^^^^^ no value can reach this
error: unreachable pattern
--> $DIR/floats.rs:31:9
|
LL | 0.01f32..=6.5f32 => {}
| ---------------- matches all the relevant values
LL | 0.01f32 => {}
| ^^^^^^^ no value can reach this
error: unreachable pattern
--> $DIR/floats.rs:32:9
|
LL | 0.01f32..=6.5f32 => {}
| ---------------- matches all the relevant values
LL | 0.01f32 => {}
LL | 0.02f32 => {}
| ^^^^^^^ no value can reach this
error: unreachable pattern
--> $DIR/floats.rs:33:9
|
LL | 0.01f32..=6.5f32 => {}
| ---------------- matches all the relevant values
...
LL | 6.5f32 => {}
| ^^^^^^ no value can reach this
error: unreachable pattern
--> $DIR/floats.rs:45:9
|
LL | 0.01f64..=6.5f64 => {}
| ---------------- matches all the relevant values
LL | 0.005f64 => {}
LL | 0.01f64 => {}
| ^^^^^^^ no value can reach this
error: unreachable pattern
--> $DIR/floats.rs:46:9
2023-09-29 11:33:07 -05:00
|
LL | 0.01f64..=6.5f64 => {}
| ---------------- matches all the relevant values
...
2023-09-29 11:33:07 -05:00
LL | 0.02f64 => {}
| ^^^^^^^ no value can reach this
2023-09-29 11:33:07 -05:00
error: unreachable pattern
--> $DIR/floats.rs:47:9
2023-09-29 11:33:07 -05:00
|
LL | 0.01f64..=6.5f64 => {}
| ---------------- matches all the relevant values
...
2023-09-29 11:33:07 -05:00
LL | 6.5f64 => {}
| ^^^^^^ no value can reach this
2023-09-29 11:33:07 -05:00
error: unreachable pattern
--> $DIR/floats.rs:49:9
2023-09-29 11:33:07 -05:00
|
LL | 0.01f64..=6.5f64 => {}
| ---------------- matches all the relevant values
...
2023-09-29 11:33:07 -05:00
LL | 1.0f64..=4.0f64 => {}
| ^^^^^^^^^^^^^^^ no value can reach this
2023-09-29 11:33:07 -05:00
error: unreachable pattern
--> $DIR/floats.rs:62:9
2023-09-29 11:33:07 -05:00
|
LL | 0.01f128..=6.5f128 => {}
| ------------------ matches all the relevant values
LL | 0.005f128 => {}
LL | 0.01f128 => {}
| ^^^^^^^^ no value can reach this
2023-09-29 11:33:07 -05:00
error: unreachable pattern
--> $DIR/floats.rs:63:9
2023-09-29 11:33:07 -05:00
|
LL | 0.01f128..=6.5f128 => {}
| ------------------ matches all the relevant values
...
LL | 0.02f128 => {}
| ^^^^^^^^ no value can reach this
error: unreachable pattern
--> $DIR/floats.rs:64:9
|
LL | 0.01f128..=6.5f128 => {}
| ------------------ matches all the relevant values
...
LL | 6.5f128 => {}
| ^^^^^^^ no value can reach this
2023-09-29 11:33:07 -05:00
error: unreachable pattern
--> $DIR/floats.rs:66:9
2023-09-29 11:33:07 -05:00
|
LL | 0.01f128..=6.5f128 => {}
| ------------------ matches all the relevant values
...
LL | 1.0f128..=4.0f128 => {}
| ^^^^^^^^^^^^^^^^^ no value can reach this
2023-09-29 11:33:07 -05:00
error: aborting due to 15 previous errors
For more information about this error, try `rustc --explain E0004`.