|
| 1 | +error: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq, Eq)]` |
| 2 | + --> $DIR/consts-opaque.rs:34:9 |
| 3 | + | |
| 4 | +LL | FOO => {} |
| 5 | + | ^^^ |
| 6 | + |
| 7 | +error: unreachable pattern |
| 8 | + --> $DIR/consts-opaque.rs:36:9 |
| 9 | + | |
| 10 | +LL | _ => {} // should not be emitting unreachable warning |
| 11 | + | ^ |
| 12 | + | |
| 13 | +note: the lint level is defined here |
| 14 | + --> $DIR/consts-opaque.rs:6:9 |
| 15 | + | |
| 16 | +LL | #![deny(unreachable_patterns)] |
| 17 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 18 | + |
| 19 | +error: to use a constant of type `Foo` in a pattern, `Foo` must be annotated with `#[derive(PartialEq, Eq)]` |
| 20 | + --> $DIR/consts-opaque.rs:41:9 |
| 21 | + | |
| 22 | +LL | FOO_REF => {} |
| 23 | + | ^^^^^^^ |
| 24 | + |
| 25 | +error: unreachable pattern |
| 26 | + --> $DIR/consts-opaque.rs:43:9 |
| 27 | + | |
| 28 | +LL | Foo(_) => {} // should not be emitting unreachable warning |
| 29 | + | ^^^^^^ |
| 30 | + |
| 31 | +error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]` |
| 32 | + --> $DIR/consts-opaque.rs:55:9 |
| 33 | + | |
| 34 | +LL | BAR => {} // should not be emitting unreachable warning |
| 35 | + | ^^^ |
| 36 | + |
| 37 | +error: unreachable pattern |
| 38 | + --> $DIR/consts-opaque.rs:55:9 |
| 39 | + | |
| 40 | +LL | Bar => {} |
| 41 | + | --- matches any value |
| 42 | +LL | BAR => {} // should not be emitting unreachable warning |
| 43 | + | ^^^ unreachable pattern |
| 44 | + |
| 45 | +error: unreachable pattern |
| 46 | + --> $DIR/consts-opaque.rs:58:9 |
| 47 | + | |
| 48 | +LL | Bar => {} |
| 49 | + | --- matches any value |
| 50 | +... |
| 51 | +LL | _ => {} |
| 52 | + | ^ unreachable pattern |
| 53 | + |
| 54 | +error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]` |
| 55 | + --> $DIR/consts-opaque.rs:63:9 |
| 56 | + | |
| 57 | +LL | BAR => {} |
| 58 | + | ^^^ |
| 59 | + |
| 60 | +error: unreachable pattern |
| 61 | + --> $DIR/consts-opaque.rs:65:9 |
| 62 | + | |
| 63 | +LL | Bar => {} // should not be emitting unreachable warning |
| 64 | + | ^^^ |
| 65 | + |
| 66 | +error: unreachable pattern |
| 67 | + --> $DIR/consts-opaque.rs:67:9 |
| 68 | + | |
| 69 | +LL | Bar => {} // should not be emitting unreachable warning |
| 70 | + | --- matches any value |
| 71 | +LL | |
| 72 | +LL | _ => {} |
| 73 | + | ^ unreachable pattern |
| 74 | + |
| 75 | +error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]` |
| 76 | + --> $DIR/consts-opaque.rs:72:9 |
| 77 | + | |
| 78 | +LL | BAR => {} |
| 79 | + | ^^^ |
| 80 | + |
| 81 | +error: to use a constant of type `Bar` in a pattern, `Bar` must be annotated with `#[derive(PartialEq, Eq)]` |
| 82 | + --> $DIR/consts-opaque.rs:74:9 |
| 83 | + | |
| 84 | +LL | BAR => {} // should not be emitting unreachable warning |
| 85 | + | ^^^ |
| 86 | + |
| 87 | +error: unreachable pattern |
| 88 | + --> $DIR/consts-opaque.rs:74:9 |
| 89 | + | |
| 90 | +LL | BAR => {} // should not be emitting unreachable warning |
| 91 | + | ^^^ |
| 92 | + |
| 93 | +error: unreachable pattern |
| 94 | + --> $DIR/consts-opaque.rs:77:9 |
| 95 | + | |
| 96 | +LL | _ => {} // should not be emitting unreachable warning |
| 97 | + | ^ |
| 98 | + |
| 99 | +error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]` |
| 100 | + --> $DIR/consts-opaque.rs:82:9 |
| 101 | + | |
| 102 | +LL | BAZ => {} |
| 103 | + | ^^^ |
| 104 | + |
| 105 | +error: unreachable pattern |
| 106 | + --> $DIR/consts-opaque.rs:84:9 |
| 107 | + | |
| 108 | +LL | Baz::Baz1 => {} // should not be emitting unreachable warning |
| 109 | + | ^^^^^^^^^ |
| 110 | + |
| 111 | +error: unreachable pattern |
| 112 | + --> $DIR/consts-opaque.rs:86:9 |
| 113 | + | |
| 114 | +LL | _ => {} |
| 115 | + | ^ |
| 116 | + |
| 117 | +error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]` |
| 118 | + --> $DIR/consts-opaque.rs:92:9 |
| 119 | + | |
| 120 | +LL | BAZ => {} |
| 121 | + | ^^^ |
| 122 | + |
| 123 | +error: unreachable pattern |
| 124 | + --> $DIR/consts-opaque.rs:94:9 |
| 125 | + | |
| 126 | +LL | _ => {} |
| 127 | + | ^ |
| 128 | + |
| 129 | +error: to use a constant of type `Baz` in a pattern, `Baz` must be annotated with `#[derive(PartialEq, Eq)]` |
| 130 | + --> $DIR/consts-opaque.rs:99:9 |
| 131 | + | |
| 132 | +LL | BAZ => {} |
| 133 | + | ^^^ |
| 134 | + |
| 135 | +error: unreachable pattern |
| 136 | + --> $DIR/consts-opaque.rs:101:9 |
| 137 | + | |
| 138 | +LL | Baz::Baz2 => {} // should not be emitting unreachable warning |
| 139 | + | ^^^^^^^^^ |
| 140 | + |
| 141 | +error: unreachable pattern |
| 142 | + --> $DIR/consts-opaque.rs:103:9 |
| 143 | + | |
| 144 | +LL | _ => {} // should not be emitting unreachable warning |
| 145 | + | ^ |
| 146 | + |
| 147 | +error: unreachable pattern |
| 148 | + --> $DIR/consts-opaque.rs:109:9 |
| 149 | + | |
| 150 | +LL | QUUX => {} // should not be emitting unreachable warning |
| 151 | + | ^^^^ |
| 152 | + |
| 153 | +error: aborting due to 23 previous errors |
| 154 | + |
0 commit comments