Skip to main content

new_consumes_position

Function new_consumes_position 

Source
pub fn new_consumes_position(
    source: &str,
    last_clause_end: Option<usize>,
    header_end: usize,
    braced: bool,
) -> Option<(usize, String)>
Expand description

#3536: where a consumes line a file lacks is inserted, with the line break (and indent) that precedes it. After the file’s last uses or consumes clause (the parser wants them ahead of every declaration); else after its header, which is the text up to header_end, then the { of a braced file. None when a braced file’s { is not where it should be.