Marwes/combine

Docs unclear whether `parser!` should be used on nightly rust

spencerwhite opened this issue · 2 comments

According to this page, parser! isn't necessary on nightly rust since you can use impl Parser<...> instead. It points to this file as an example, but this line uses parser!.

I'm not completely opposed to macros, but it would be really nice to not have to use them.

impl Parser can be used for most parsers regardless of whether you use stable or nightly now (the comment is outdated). However you do need to use parser! or opaque! to construct parsers which contain itself to prevent the impl Parser type from containing itself (which is impossible).

combine/benches/json.rs

Lines 165 to 166 in 24be5ab

// We need to use `parser!` to break the recursive use of `value` to prevent the returned parser
// from containing itself

Alright, thanks