()
| 2631 | } |
| 2632 | Some(b'\n') => { |
| 2633 | return Err(error_at( |
| 2634 | j, |
| 2635 | 1, |
| 2636 | "format string interpolations must be single-line", |
| 2637 | )); |
| 2638 | } |
| 2639 | Some(b'}') => break, |
| 2640 | Some(_) => j += 1, |
| 2641 | } |
| 2642 | } |
| 2643 | if j == hole_start { |
| 2644 | return Err(error_at(i, 2, "empty format string interpolation")); |
| 2645 | } |
| 2646 | let expr = |
| 2647 | self.parse_hole_expression(&content[hole_start..j], span, hole_start)?; |
| 2648 | segments.push(FormatSegment::Hole(expr)); |
| 2649 | i = j + 1; |
| 2650 | piece_start = i; |
| 2651 | } |
| 2652 | _ => i += 1, |
| 2653 | } |
| 2654 | } |
| 2655 | literal.push_str(&self.process_string_escapes(&content[piece_start.min(content.len())..])); |
nothing calls this directly
no test coverage detected