1 error: the function has a cyclomatic complexity of 28
2 --> $DIR/cyclomatic_complexity.rs:7:1
13 note: lint level defined here
14 --> $DIR/cyclomatic_complexity.rs:4:9
16 4 | #![deny(cyclomatic_complexity)]
17 | ^^^^^^^^^^^^^^^^^^^^^
18 = help: you could split it up into multiple smaller functions
20 error: the function has a cyclomatic complexity of 7
21 --> $DIR/cyclomatic_complexity.rs:92:1
25 94 | | 'a: for i in 0..20 {
26 95 | | 'b: for j in i..20 {
32 = help: you could split it up into multiple smaller functions
34 error: the function has a cyclomatic complexity of 1
35 --> $DIR/cyclomatic_complexity.rs:138:1
37 138 | / fn lots_of_short_circuits() -> bool {
38 139 | | 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 1
45 --> $DIR/cyclomatic_complexity.rs:143:1
47 143 | / fn lots_of_short_circuits2() -> bool {
48 144 | | true || false || true || false || true || false || true
52 = help: you could split it up into multiple smaller functions
54 error: the function has a cyclomatic complexity of 2
55 --> $DIR/cyclomatic_complexity.rs:148:1
58 149 | | let x = || match 99 {
66 = help: you could split it up into multiple smaller functions
68 error: the function has a cyclomatic complexity of 2
69 --> $DIR/cyclomatic_complexity.rs:149:13
71 149 | let x = || match 99 {
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:166:1
88 168 | | 0 => println!("hi"),
89 169 | | _ => println!("bye"),
94 = help: you could split it up into multiple smaller functions
96 error: the function has a cyclomatic complexity of 2
97 --> $DIR/cyclomatic_complexity.rs:185:1
101 187 | | 0 => println!("hi"),
102 188 | | 1 => println!("bla"),
108 = help: you could split it up into multiple smaller functions
110 error: the function has a cyclomatic complexity of 3
111 --> $DIR/cyclomatic_complexity.rs:195:1
115 197 | | 0 => println!("hi"),
116 198 | | 1 => println!("bla"),
122 = help: you could split it up into multiple smaller functions
124 error: the function has a cyclomatic complexity of 2
125 --> $DIR/cyclomatic_complexity.rs:211:1
129 213 | | 0 => println!("hi"),
130 214 | | 1 => panic!("bla"),
136 = help: you could split it up into multiple smaller functions
138 error: the function has a cyclomatic complexity of 3
139 --> $DIR/cyclomatic_complexity.rs:221:1
141 221 | / fn barrr2() {
143 223 | | 0 => println!("hi"),
144 224 | | 1 => panic!("bla"),
150 = help: you could split it up into multiple smaller functions
152 error: the function has a cyclomatic complexity of 2
153 --> $DIR/cyclomatic_complexity.rs:237:1
155 237 | / fn barrrr() {
157 239 | | 0 => println!("hi"),
158 240 | | 1 => println!("bla"),
164 = help: you could split it up into multiple smaller functions
166 error: the function has a cyclomatic complexity of 3
167 --> $DIR/cyclomatic_complexity.rs:247:1
169 247 | / fn barrrr2() {
171 249 | | 0 => println!("hi"),
172 250 | | 1 => println!("bla"),
178 = help: you could split it up into multiple smaller functions
180 error: the function has a cyclomatic complexity of 2
181 --> $DIR/cyclomatic_complexity.rs:263:1
185 265 | | println!("yea");
188 269 | | println!("whee");
192 = help: you could split it up into multiple smaller functions
194 error: the function has a cyclomatic complexity of 4
195 --> $DIR/cyclomatic_complexity.rs:274:1
197 274 | / pub fn read_file(input_path: &str) -> String {
198 275 | | use std::fs::File;
199 276 | | use std::io::{Read, Write};
200 277 | | use std::path::Path;
206 = help: you could split it up into multiple smaller functions
208 error: the function has a cyclomatic complexity of 1
209 --> $DIR/cyclomatic_complexity.rs:305:1
211 305 | / fn void(void: Void) {
219 = help: you could split it up into multiple smaller functions
221 error: the function has a cyclomatic complexity of 1
222 --> $DIR/cyclomatic_complexity.rs:319:1
224 319 | / fn try() -> Result<i32, &'static str> {
227 322 | | _ => return Err("bla"),
232 = help: you could split it up into multiple smaller functions
234 error: the function has a cyclomatic complexity of 1
235 --> $DIR/cyclomatic_complexity.rs:327:1
237 327 | / fn try_again() -> Result<i32, &'static str> {
238 328 | | let _ = try!(Ok(42));
239 329 | | let _ = try!(Ok(43));
240 330 | | let _ = try!(Ok(44));
246 = help: you could split it up into multiple smaller functions
248 error: the function has a cyclomatic complexity of 1
249 --> $DIR/cyclomatic_complexity.rs:343:1
251 343 | / fn early() -> Result<i32, &'static str> {
252 344 | | return Ok(5);
253 345 | | return Ok(5);
254 346 | | return Ok(5);
256 352 | | return Ok(5);
260 = help: you could split it up into multiple smaller functions
262 error: the function has a cyclomatic complexity of 8
263 --> $DIR/cyclomatic_complexity.rs:356:1
265 356 | / fn early_ret() -> i32 {
266 357 | | let a = if true { 42 } else { return 0; };
267 358 | | let a = if a < 99 { 42 } else { return 0; };
268 359 | | let a = if a < 99 { 42 } else { return 0; };
274 = help: you could split it up into multiple smaller functions
276 error: aborting due to 20 previous errors