Parse the line and column number of function block. A function block is wrapped in a pair of braces, i.e. `{ ... }` 1. If the function block is empty, this function will return the result of [parse_body_loc_start] function 2. If the function block has statement in it, this function will return the line and column number of the beginning of first statement. ```compile_fail fn hello_3(world: &Wo
(block: &syn::Block)
| 94 | /// } |
| 95 | /// ``` |
| 96 | fn parse_body_loc_end(block: &syn::Block) -> LineColumn { |
| 97 | let mut loc = parse_body_loc_start(block); |
| 98 | if let Some(first_stmt) = block.stmts.first() { |
| 99 | let mut first_stmt_loc: LineColumn = first_stmt.span().start().into_loc(); |
| 100 | if let Some(col) = first_stmt_loc.column.as_mut() { |
| 101 | *col += 1; |
| 102 | } |
| 103 | loc = first_stmt_loc; |
| 104 | } |
| 105 | loc |
| 106 | } |
| 107 | |
| 108 | pub(crate) trait IntoLineColumn { |
| 109 | fn into_loc(self) -> LineColumn; |
no test coverage detected