pub fn optional_owns_anything(
    resolve: &Resolve,
    ty: Option<&Type>,
    is_local_resource: &dyn Fn(&Resolve, TypeId) -> bool
) -> bool