]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-22933-1.rs
Rollup merge of #57278 - mati865:config_clippy, r=alexcrichton
[rust.git] / src / test / ui / issues / issue-22933-1.rs
1 // compile-pass
2 // skip-codegen
3 #![allow(warnings)]
4 struct CNFParser {
5     token: char,
6 }
7
8 impl CNFParser {
9     fn is_whitespace(c: char) -> bool {
10         c == ' ' || c == '\n'
11     }
12
13     fn consume_whitespace(&mut self) {
14         self.consume_while(&(CNFParser::is_whitespace))
15     }
16
17     fn consume_while(&mut self, p: &Fn(char) -> bool) {
18         while p(self.token) {
19             return
20         }
21     }
22 }
23
24
25 fn main() {}