Skip to main content

classify

Function classify 

Source
pub fn classify(change: &Change, old: &Package, new: &Package) -> Verdict
Expand description

Classifies one change against the two snapshots it was drawn from.

old and new are the matched packages the change belongs to; the change’s path is resolved against them to recover the typed IR the direction is read from. For a package present on only one side the caller passes that package as both arguments — those changes classify on their category alone.

A reference to a declaration of another package is not resolved here, and a type the diff cannot resolve is reported as breaking: an appended struct field typed from another package classifies breaking. diff_sets_in resolves such a reference against every package of the new snapshot and the context packages, such as ridl.std.