1 error: the function has a cyclomatic complexity of 28
2 --> $DIR/cyclomatic_complexity.rs:7:1
14 note: lint level defined here
15 --> $DIR/cyclomatic_complexity.rs:4:9
17 4 | #![deny(cyclomatic_complexity)]
18 | ^^^^^^^^^^^^^^^^^^^^^
19 = help: you could split it up into multiple smaller functions
21 error: the function has a cyclomatic complexity of 7
22 --> $DIR/cyclomatic_complexity.rs:92:1
27 94 | | 'a: for i in 0..20 {
28 95 | | 'b: for j in i..20 {
34 = help: you could split it up into multiple smaller functions
36 error: the function has a cyclomatic complexity of 1
37 --> $DIR/cyclomatic_complexity.rs:138:1
39 138 | fn lots_of_short_circuits() -> bool {
41 139 | | true && false && true && false && true && false && true
45 = help: you could split it up into multiple smaller functions
47 error: the function has a cyclomatic complexity of 1
48 --> $DIR/cyclomatic_complexity.rs:143:1
50 143 | fn lots_of_short_circuits2() -> bool {
52 144 | | true || false || true || false || true || false || true
56 = help: you could split it up into multiple smaller functions
58 error: the function has a cyclomatic complexity of 2
59 --> $DIR/cyclomatic_complexity.rs:148:1
63 149 | | let x = || match 99 {
71 = help: you could split it up into multiple smaller functions
73 error: the function has a cyclomatic complexity of 2
74 --> $DIR/cyclomatic_complexity.rs:149:13
76 149 | let x = || match 99 {
77 | _____________^ starting here...
84 | |_____^ ...ending here
86 = help: you could split it up into multiple smaller functions
88 error: the function has a cyclomatic complexity of 2
89 --> $DIR/cyclomatic_complexity.rs:166:1
94 168 | | 0 => println!("hi"),
95 169 | | _ => println!("bye"),
100 = help: you could split it up into multiple smaller functions
102 error: the function has a cyclomatic complexity of 2
103 --> $DIR/cyclomatic_complexity.rs:185:1
106 | _^ starting here...
108 187 | | 0 => println!("hi"),
109 188 | | 1 => println!("bla"),
115 = help: you could split it up into multiple smaller functions
117 error: the function has a cyclomatic complexity of 3
118 --> $DIR/cyclomatic_complexity.rs:195:1
121 | _^ starting here...
123 197 | | 0 => println!("hi"),
124 198 | | 1 => println!("bla"),
130 = help: you could split it up into multiple smaller functions
132 error: the function has a cyclomatic complexity of 2
133 --> $DIR/cyclomatic_complexity.rs:211:1
136 | _^ starting here...
138 213 | | 0 => println!("hi"),
139 214 | | 1 => panic!("bla"),
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:221:1
151 | _^ starting here...
153 223 | | 0 => println!("hi"),
154 224 | | 1 => panic!("bla"),
160 = help: you could split it up into multiple smaller functions
162 error: the function has a cyclomatic complexity of 2
163 --> $DIR/cyclomatic_complexity.rs:237:1
166 | _^ starting here...
168 239 | | 0 => println!("hi"),
169 240 | | 1 => println!("bla"),
175 = help: you could split it up into multiple smaller functions
177 error: the function has a cyclomatic complexity of 3
178 --> $DIR/cyclomatic_complexity.rs:247:1
181 | _^ starting here...
183 249 | | 0 => println!("hi"),
184 250 | | 1 => println!("bla"),
190 = help: you could split it up into multiple smaller functions
192 error: the function has a cyclomatic complexity of 2
193 --> $DIR/cyclomatic_complexity.rs:263:1
196 | _^ starting here...
198 265 | | println!("yea");
201 269 | | println!("whee");
205 = help: you could split it up into multiple smaller functions
207 error: the function has a cyclomatic complexity of 4
208 --> $DIR/cyclomatic_complexity.rs:274:1
210 274 | pub fn read_file(input_path: &str) -> String {
211 | _^ starting here...
212 275 | | use std::fs::File;
213 276 | | use std::io::{Read, Write};
214 277 | | use std::path::Path;
220 = help: you could split it up into multiple smaller functions
222 error: the function has a cyclomatic complexity of 1
223 --> $DIR/cyclomatic_complexity.rs:305:1
225 305 | fn void(void: Void) {
226 | _^ starting here...
234 = help: you could split it up into multiple smaller functions
236 error: the function has a cyclomatic complexity of 1
237 --> $DIR/cyclomatic_complexity.rs:319:1
239 319 | fn try() -> Result<i32, &'static str> {
240 | _^ starting here...
243 322 | | _ => return Err("bla"),
248 = help: you could split it up into multiple smaller functions
250 error: the function has a cyclomatic complexity of 1
251 --> $DIR/cyclomatic_complexity.rs:327:1
253 327 | fn try_again() -> Result<i32, &'static str> {
254 | _^ starting here...
255 328 | | let _ = try!(Ok(42));
256 329 | | let _ = try!(Ok(43));
257 330 | | let _ = try!(Ok(44));
263 = help: you could split it up into multiple smaller functions
265 error: the function has a cyclomatic complexity of 1
266 --> $DIR/cyclomatic_complexity.rs:343:1
268 343 | fn early() -> Result<i32, &'static str> {
269 | _^ starting here...
270 344 | | return Ok(5);
271 345 | | return Ok(5);
272 346 | | return Ok(5);
274 352 | | return Ok(5);
278 = help: you could split it up into multiple smaller functions
280 error: the function has a cyclomatic complexity of 8
281 --> $DIR/cyclomatic_complexity.rs:356:1
283 356 | fn early_ret() -> i32 {
284 | _^ starting here...
285 357 | | let a = if true { 42 } else { return 0; };
286 358 | | let a = if a < 99 { 42 } else { return 0; };
287 359 | | let a = if a < 99 { 42 } else { return 0; };
293 = help: you could split it up into multiple smaller functions
295 error: aborting due to 20 previous errors