File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -823,7 +823,7 @@ impl YaccParser {
823823 ':' => {
824824 let k = j + ':' . len_utf8 ( ) ;
825825 if k == self . src . len ( ) || !self . src [ k..] . starts_with ( ':' ) {
826- return Ok ( ( j, self . src [ i..j] . to_string ( ) ) ) ;
826+ return Ok ( ( j, self . src [ i..j] . trim ( ) . to_string ( ) ) ) ;
827827 }
828828 j += 2 * ':' . len_utf8 ( ) ;
829829 }
Original file line number Diff line number Diff line change @@ -9,7 +9,12 @@ grammar: |
99 // Since then we relaxed the bounds to require `Clone`.
1010 // This tests backwards compatibility of actions that
1111 // rely on the older copy bounds.
12- 'INT' { (move |_| {})(p); check_copy(p); p + $lexer.span_str($1.unwrap().span()).parse::<u64>().unwrap() }
12+ 'INT' {
13+ #[allow(clippy::redundant_closure_call)]
14+ (move |_| {})(p);
15+ check_copy(p);
16+ p + $lexer.span_str($1.unwrap().span()).parse::<u64>().unwrap()
17+ }
1318 ;
1419 %%
1520 fn check_copy<T: Copy>(_: T){}
You can’t perform that action at this time.
0 commit comments