Skip to main content

source_position

Function source_position 

Source
pub(crate) fn source_position(span: Span) -> String
Expand description

The (file:line:col) a wrapper comment gives for a syntax span, e.g. (lib.rs:114:12).

The file is the one file!() names, as in the # Generated from Rust … headers, and the column is 1-based. The wrapper writer compares wrappers with every (<file>.rs:LINE:COL) position normalized, so a comment in this form doesn’t rewrite the wrappers file when only lines above it moved.