1 error: the function has a cyclomatic complexity of 28
2 --> $DIR/cyclomatic_complexity.rs:7:1
4 7 | fn main() { //~ERROR the function has a cyclomatic complexity of 28
7 note: lint level defined here
8 --> $DIR/cyclomatic_complexity.rs:4:9
10 4 | #![deny(cyclomatic_complexity)]
11 | ^^^^^^^^^^^^^^^^^^^^^
12 = help: you could split it up into multiple smaller functions
14 error: the function has a cyclomatic complexity of 7
15 --> $DIR/cyclomatic_complexity.rs:92:1
17 92 | fn kaboom() { //~ ERROR: the function has a cyclomatic complexity of 7
20 = help: you could split it up into multiple smaller functions
22 error: the function has a cyclomatic complexity of 1
23 --> $DIR/cyclomatic_complexity.rs:138:1
25 138 | fn lots_of_short_circuits() -> bool { //~ ERROR: the function has a cyclomatic complexity of 1
27 139 | | true && false && true && false && true && false && true
31 = help: you could split it up into multiple smaller functions
33 error: the function has a cyclomatic complexity of 1
34 --> $DIR/cyclomatic_complexity.rs:143:1
36 143 | fn lots_of_short_circuits2() -> bool { //~ ERROR: the function has a cyclomatic complexity of 1
38 144 | | true || false || true || false || true || false || true
42 = help: you could split it up into multiple smaller functions
44 error: the function has a cyclomatic complexity of 2
45 --> $DIR/cyclomatic_complexity.rs:148:1
47 148 | fn baa() { //~ ERROR: the function has a cyclomatic complexity of 2
50 = help: you could split it up into multiple smaller functions
52 error: the function has a cyclomatic complexity of 2
53 --> $DIR/cyclomatic_complexity.rs:149:13
55 149 | let x = || match 99 { //~ ERROR: the function has a cyclomatic complexity of 2
56 | _____________^ starting here...
65 | |_____^ ...ending here
67 = help: you could split it up into multiple smaller functions
69 error: the function has a cyclomatic complexity of 2
70 --> $DIR/cyclomatic_complexity.rs:166:1
72 166 | fn bar() { //~ ERROR: the function has a cyclomatic complexity of 2
75 168 | | 0 => println!("hi"),
76 169 | | _ => println!("bye"),
81 = help: you could split it up into multiple smaller functions
83 error: the function has a cyclomatic complexity of 2
84 --> $DIR/cyclomatic_complexity.rs:185:1
86 185 | fn barr() { //~ ERROR: the function has a cyclomatic complexity of 2
89 187 | | 0 => println!("hi"),
90 188 | | 1 => println!("bla"),
91 189 | | 2 | 3 => println!("blub"),
92 190 | | _ => println!("bye"),
97 = help: you could split it up into multiple smaller functions
99 error: the function has a cyclomatic complexity of 3
100 --> $DIR/cyclomatic_complexity.rs:195:1
102 195 | fn barr2() { //~ ERROR: the function has a cyclomatic complexity of 3
105 = help: you could split it up into multiple smaller functions
107 error: the function has a cyclomatic complexity of 2
108 --> $DIR/cyclomatic_complexity.rs:211:1
110 211 | fn barrr() { //~ ERROR: the function has a cyclomatic complexity of 2
111 | _^ starting here...
113 213 | | 0 => println!("hi"),
114 214 | | 1 => panic!("bla"),
115 215 | | 2 | 3 => println!("blub"),
116 216 | | _ => println!("bye"),
121 = help: you could split it up into multiple smaller functions
123 error: the function has a cyclomatic complexity of 3
124 --> $DIR/cyclomatic_complexity.rs:221:1
126 221 | fn barrr2() { //~ ERROR: the function has a cyclomatic complexity of 3
129 = help: you could split it up into multiple smaller functions
131 error: the function has a cyclomatic complexity of 2
132 --> $DIR/cyclomatic_complexity.rs:237:1
134 237 | fn barrrr() { //~ ERROR: the function has a cyclomatic complexity of 2
135 | _^ starting here...
137 239 | | 0 => println!("hi"),
138 240 | | 1 => println!("bla"),
139 241 | | 2 | 3 => panic!("blub"),
140 242 | | _ => println!("bye"),
145 = help: you could split it up into multiple smaller functions
147 error: the function has a cyclomatic complexity of 3
148 --> $DIR/cyclomatic_complexity.rs:247:1
150 247 | fn barrrr2() { //~ ERROR: the function has a cyclomatic complexity of 3
153 = help: you could split it up into multiple smaller functions
155 error: the function has a cyclomatic complexity of 2
156 --> $DIR/cyclomatic_complexity.rs:263:1
158 263 | fn cake() { //~ ERROR: the function has a cyclomatic complexity of 2
159 | _^ starting here...
161 265 | | println!("yea");
163 267 | | panic!("meh");
165 269 | | println!("whee");
169 = help: you could split it up into multiple smaller functions
171 error: the function has a cyclomatic complexity of 4
172 --> $DIR/cyclomatic_complexity.rs:274:1
174 274 | pub fn read_file(input_path: &str) -> String { //~ ERROR: the function has a cyclomatic complexity of 4
177 = help: you could split it up into multiple smaller functions
179 error: the function has a cyclomatic complexity of 1
180 --> $DIR/cyclomatic_complexity.rs:305:1
182 305 | fn void(void: Void) { //~ ERROR: the function has a cyclomatic complexity of 1
183 | _^ starting here...
191 = help: you could split it up into multiple smaller functions
193 error: the function has a cyclomatic complexity of 1
194 --> $DIR/cyclomatic_complexity.rs:319:1
196 319 | fn try() -> Result<i32, &'static str> { //~ ERROR: cyclomatic complexity of 1
197 | _^ starting here...
200 322 | | _ => return Err("bla"),
205 = help: you could split it up into multiple smaller functions
207 error: the function has a cyclomatic complexity of 1
208 --> $DIR/cyclomatic_complexity.rs:327:1
210 327 | fn try_again() -> Result<i32, &'static str> { //~ ERROR: cyclomatic complexity of 1
213 = help: you could split it up into multiple smaller functions
215 error: the function has a cyclomatic complexity of 1
216 --> $DIR/cyclomatic_complexity.rs:343:1
218 343 | fn early() -> Result<i32, &'static str> { //~ ERROR: cyclomatic complexity of 1
221 = help: you could split it up into multiple smaller functions
223 error: the function has a cyclomatic complexity of 8
224 --> $DIR/cyclomatic_complexity.rs:356:1
226 356 | fn early_ret() -> i32 { //~ ERROR: cyclomatic complexity of 8
229 = help: you could split it up into multiple smaller functions
231 error: aborting due to 20 previous errors