Rust infamously generates absurd error messages and suggestions when compiling code that uses chumsky, my parser combinator crate. I figured it would be a good addition to this collection!
Example error
```
error[E0271]: type mismatch resolving ') -> String as FnOnce<(Vec,)>>::Output == Json'
--> tests/chumsky/json.rs:92:17
|
92 | .or(string)
| -- ^^^^^^ expected enum 'Json', found struct 'String'
| |
| required by a bound introduced by this call
|
= note: required because of the requirements on the impl of 'chumsky::Parser' for 'chumsky::combinator::Map>, Repeated>, chumsky::combinator::Map>, Or>, Just>>, Just>>, To>, char, char>>, To>, char, char>>, To>, char, char>>, To>, char, char>>, To>, char, char>>, chumsky::combinator::Map>, Validate>>, fn(Vec) -> String, Vec>, String, [closure@$DIR/tests/chumsky/json.rs:48:35: 54:26]>>, fn((char, char)) -> char, (char, char)>>>, fn((char, char)) -> char, (char, char)>>>>, fn((char, Vec)) -> Vec, (char, Vec)>, Just>>, fn((Vec, char)) -> Vec, (Vec, char)>, fn(Vec) -> String, Vec>'
= note: 1 redundant requirement hidden
= note: required because of the requirements on the impl of 'chumsky::Parser' for 'Label>, Repeated>, chumsky::combinator::Map>, Or>, Just>>, Just>>, To>, char, char>>, To>, char, char>>, To>, char, char>>, To>, char, char>>, To>, char, char>>, chumsky::combinator::Map>, Validate>>, fn(Vec) -> String, Vec>, String, [closure@$DIR/tests/chumsky/json.rs:48:35: 54:26]>>, fn((char, char)) -> char, (char, char)>>>, fn((char, char)) -> char, (char, char)>>>>, fn((char, Vec)) -> Vec, (char, Vec)>, Just>>, fn((Vec, char)) -> Vec, (Vec, char)>, fn(Vec) -> String, Vec>, &str>'
note: required by a bound in 'or'
--> $CARGO/chumsky-0.8.0/src/lib.rs
|
| P: Parser,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in 'or'
error[E0599]: the method 'or' exists for struct 'Or>, &str, Json>, &str>, Label>, &str, Json>, &str>>, Label>, &str, Json>, &str>>, chumsky::combinator::Map
Rust infamously generates absurd error messages and suggestions when compiling code that uses chumsky, my parser combinator crate. I figured it would be a good addition to this collection!
Example error
``` error[E0271]: type mismatch resolving '