pub fn check_edits(
path: &Path,
source: &str,
edits: &[SpanEdit],
removable: impl Fn(&str) -> bool,
) -> Result<(), PostEditViolation>Expand description
Check the edit of one file: edits applied to source, the text of the
file at path. removable tells which exported names the edit may
remove. The language server and the CI review comments call this check
before they offer an edit. fallow fix runs the same check over all the
files that it edits.
ยงErrors
The first violation that the check finds. An edit list with overlapping
or invalid ranges, or a source that does not parse, gives
PostEditViolation::DoesNotParse.