Skip to content

Commit

Permalink
Oh hey, compiler diagnostic is pretty useful
Browse files Browse the repository at this point in the history
Not sure if I like this syntax, but okay.
It'd be nice if there was a way to have a negative trait bound, i.e. "P
is a Parser but not a Combinator", but that's part of Rust unstable so
far, rust-lang/rust#68318.
  • Loading branch information
Encephala committed Feb 27, 2024
1 parent 0249d59 commit b57bb49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sql-parse/src/parsers/combinators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ impl<P: Parser> Combinator<P> for MultipleCombinator {
let mut count = 0;
let mut remainder = input;

while let Some((_, _remainder)) = parser.parse(remainder) {
while let Some((_, _remainder)) = <P as Parser>::parse(remainder) {
remainder = _remainder;
count += 1;
}
Expand Down

0 comments on commit b57bb49

Please sign in to comment.