fork/rust
git clone https://git.julia.blue/fork/rust
b8cedc00407
1.42.0
1error: an or-pattern parameter must be wrapped in parenthesis 2 --> $DIR/or-patterns-syntactic-fail.rs:28:13 3 | 4LL | fn fun1(A | B: E) {} 5 | ^^^^^ help: wrap the pattern in parenthesis: `(A | B)` 6 7error: a leading `|` is not allowed in a parameter pattern 8 --> $DIR/or-patterns-syntactic-fail.rs:30:13 9 | 10LL | fn fun2(| A | B: E) {} 11 | ^ help: remove the `|` 12 13error: an or-pattern parameter must be wrapped in parenthesis 14 --> $DIR/or-patterns-syntactic-fail.rs:30:15 15 | 16LL | fn fun2(| A | B: E) {} 17 | ^^^^^ help: wrap the pattern in parenthesis: `(A | B)` 18 19error: a leading `|` is only allowed in a top-level pattern 20 --> $DIR/or-patterns-syntactic-fail.rs:41:11 21 | 22LL | let ( | A | B) = E::A; 23 | ^ help: remove the `|` 24 25error: a leading `|` is only allowed in a top-level pattern 26 --> $DIR/or-patterns-syntactic-fail.rs:42:11 27 | 28LL | let ( | A | B,) = (E::B,); 29 | ^ help: remove the `|` 30 31error: a leading `|` is only allowed in a top-level pattern 32 --> $DIR/or-patterns-syntactic-fail.rs:43:11 33 | 34LL | let [ | A | B ] = [E::A]; 35 | ^ help: remove the `|` 36 37error: a leading `|` is only allowed in a top-level pattern 38 --> $DIR/or-patterns-syntactic-fail.rs:44:13 39 | 40LL | let TS( | A | B ); 41 | ^ help: remove the `|` 42 43error: a leading `|` is only allowed in a top-level pattern 44 --> $DIR/or-patterns-syntactic-fail.rs:45:17 45 | 46LL | let NS { f: | A | B }; 47 | ^ help: remove the `|` 48 49error: a leading `|` is only allowed in a top-level pattern 50 --> $DIR/or-patterns-syntactic-fail.rs:47:11 51 | 52LL | let ( || A | B) = E::A; 53 | ^^ help: remove the `||` 54 | 55 = note: alternatives in or-patterns are separated with `|`, not `||` 56 57error: a leading `|` is only allowed in a top-level pattern 58 --> $DIR/or-patterns-syntactic-fail.rs:48:11 59 | 60LL | let [ || A | B ] = [E::A]; 61 | ^^ help: remove the `||` 62 | 63 = note: alternatives in or-patterns are separated with `|`, not `||` 64 65error: a leading `|` is only allowed in a top-level pattern 66 --> $DIR/or-patterns-syntactic-fail.rs:49:13 67 | 68LL | let TS( || A | B ); 69 | ^^ help: remove the `||` 70 | 71 = note: alternatives in or-patterns are separated with `|`, not `||` 72 73error: a leading `|` is only allowed in a top-level pattern 74 --> $DIR/or-patterns-syntactic-fail.rs:50:17 75 | 76LL | let NS { f: || A | B }; 77 | ^^ help: remove the `||` 78 | 79 = note: alternatives in or-patterns are separated with `|`, not `||` 80 81error: no rules expected the token `|` 82 --> $DIR/or-patterns-syntactic-fail.rs:14:15 83 | 84LL | macro_rules! accept_pat { 85 | ----------------------- when calling this macro 86... 87LL | accept_pat!(p | q); 88 | ^ no rules expected this token in macro call 89 90error: no rules expected the token `|` 91 --> $DIR/or-patterns-syntactic-fail.rs:15:13 92 | 93LL | macro_rules! accept_pat { 94 | ----------------------- when calling this macro 95... 96LL | accept_pat!(| p | q); 97 | ^ no rules expected this token in macro call 98 99warning: the feature `or_patterns` is incomplete and may cause the compiler to crash 100 --> $DIR/or-patterns-syntactic-fail.rs:4:12 101 | 102LL | #![feature(or_patterns)] 103 | ^^^^^^^^^^^ 104 | 105 = note: `#[warn(incomplete_features)]` on by default 106 107error[E0369]: no implementation for `E | ()` 108 --> $DIR/or-patterns-syntactic-fail.rs:24:22 109 | 110LL | let _ = |A | B: E| (); 111 | ----^ -- () 112 | | 113 | E 114 | 115 = note: an implementation of `std::ops::BitOr` might be missing for `E` 116 117error[E0308]: mismatched types 118 --> $DIR/or-patterns-syntactic-fail.rs:52:36 119 | 120LL | let recovery_witness: String = 0; 121 | ------ ^ 122 | | | 123 | | expected struct `std::string::String`, found integer 124 | | help: try using a conversion method: `0.to_string()` 125 | expected due to this 126 127error: aborting due to 16 previous errors 128 129Some errors have detailed explanations: E0308, E0369. 130For more information about an error, try `rustc --explain E0308`.