fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
915 B21 linesraw
1error: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq, Eq)]`
2  --> $DIR/match-forbidden-without-eq.rs:11:9
3   |
4LL |         FOO => { }
5   |         ^^^
6   |
7   = note: the traits must be derived, manual `impl`s are not sufficient
8   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
9
10warning: floating-point types cannot be used in patterns
11  --> $DIR/match-forbidden-without-eq.rs:18:9
12   |
13LL |         f32::INFINITY => { }
14   |         ^^^^^^^^^^^^^
15   |
16   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
17   = note: for more information, see issue #41620 <https://github.com/rust-lang/rust/issues/41620>
18   = note: `#[warn(illegal_floating_point_literal_pattern)]` on by default
19
20error: aborting due to previous error; 1 warning emitted
21