fork/rust
git clone https://git.julia.blue/fork/rust
4560ea788cb
1.39.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 55error: a leading `|` is only allowed in a top-level pattern 56 --> $DIR/or-patterns-syntactic-fail.rs:48:11 57 | 58LL | let [ || A | B ] = [E::A]; 59 | ^^ help: remove the `||` 60 61error: a leading `|` is only allowed in a top-level pattern 62 --> $DIR/or-patterns-syntactic-fail.rs:49:13 63 | 64LL | let TS( || A | B ); 65 | ^^ help: remove the `||` 66 67error: a leading `|` is only allowed in a top-level pattern 68 --> $DIR/or-patterns-syntactic-fail.rs:50:17 69 | 70LL | let NS { f: || A | B }; 71 | ^^ help: remove the `||` 72 73error: no rules expected the token `|` 74 --> $DIR/or-patterns-syntactic-fail.rs:14:15 75 | 76LL | macro_rules! accept_pat { 77 | ----------------------- when calling this macro 78... 79LL | accept_pat!(p | q); 80 | ^ no rules expected this token in macro call 81 82error: no rules expected the token `|` 83 --> $DIR/or-patterns-syntactic-fail.rs:15:13 84 | 85LL | macro_rules! accept_pat { 86 | ----------------------- when calling this macro 87... 88LL | accept_pat!(| p | q); 89 | ^ no rules expected this token in macro call 90 91warning: the feature `or_patterns` is incomplete and may cause the compiler to crash 92 --> $DIR/or-patterns-syntactic-fail.rs:4:12 93 | 94LL | #![feature(or_patterns)] 95 | ^^^^^^^^^^^ 96 | 97 = note: `#[warn(incomplete_features)]` on by default 98 99error[E0369]: binary operation `|` cannot be applied to type `E` 100 --> $DIR/or-patterns-syntactic-fail.rs:24:22 101 | 102LL | let _ = |A | B: E| (); 103 | ----^ -- () 104 | | 105 | E 106 | 107 = note: an implementation of `std::ops::BitOr` might be missing for `E` 108 109error[E0308]: mismatched types 110 --> $DIR/or-patterns-syntactic-fail.rs:52:36 111 | 112LL | let recovery_witness: String = 0; 113 | ^ 114 | | 115 | expected struct `std::string::String`, found integer 116 | help: try using a conversion method: `0.to_string()` 117 | 118 = note: expected type `std::string::String` 119 found type `{integer}` 120 121error: aborting due to 16 previous errors 122 123Some errors have detailed explanations: E0308, E0369. 124For more information about an error, try `rustc --explain E0308`.