(lines: &[String], start: usize)
| 3405 | } |
| 3406 | |
| 3407 | fn join_multiline_signature(lines: &[String], start: usize) -> Option<String> { |
| 3408 | let line = strip_line_comment_code(&lines[start]); |
| 3409 | if !line.contains('(') { |
| 3410 | return None; |
| 3411 | } |
| 3412 | let mut depth = 0_i32; |
| 3413 | for ch in line.chars() { |
| 3414 | if ch == '(' { |
| 3415 | depth += 1; |
| 3416 | } else if ch == ')' { |
| 3417 | depth -= 1; |
| 3418 | } |
| 3419 | } |
| 3420 | if depth <= 0 { |
| 3421 | return None; |
| 3422 | } |
| 3423 | let mut joined = line; |
| 3424 | for offset in 1..10 { |
| 3425 | let idx = start + offset; |
| 3426 | if idx >= lines.len() { |
| 3427 | break; |
| 3428 | } |
| 3429 | let next = strip_line_comment_code(&lines[idx]).trim().to_string(); |
| 3430 | joined.push(' '); |
| 3431 | joined.push_str(&next); |
| 3432 | for ch in next.chars() { |
| 3433 | if ch == '(' { |
| 3434 | depth += 1; |
| 3435 | } else if ch == ')' { |
| 3436 | depth -= 1; |
| 3437 | } |
| 3438 | } |
| 3439 | if depth <= 0 { |
| 3440 | return Some(joined); |
| 3441 | } |
| 3442 | } |
| 3443 | None |
| 3444 | } |
| 3445 | |
| 3446 | fn signature_has_noexcept(lines: &[String], start: usize, open_paren: usize) -> bool { |
| 3447 | let Some((close_line, close_col)) = find_close_paren_multiline(lines, start, open_paren) else { |
no test coverage detected