pub fn check_subset(
detected: &CapabilitySet,
declared: &CapabilitySet,
) -> Option<Violation>Expand description
Compare detected against declared, category by category.
Returns the first violation found (categories are checked in a fixed
order: alloc, io, ptr), or None if every detected level is
within its declared bound.
Categories are checked independently — this deliberately does not
attempt to find all violations in one pass; the compile error for the
first one is enough to point the developer at the right line, and fixing
it and recompiling surfaces the next one if there is one. This mirrors
how rustc itself generally reports one class of error before
re-checking.