You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: check.rs
    path of file: ./repos/grafbase/engine/crates/operation-checks/src
    
    the code of the file until where you have to start completion: mod rules;

use crate::{FieldUsage, Schema};
use graphql_schema_diff::{Change, ChangeKind};
use std::collections::HashSet;

/// A diagnostic produced by [check()].
#[derive(Debug)]
pub struct CheckDiagnostic {
    /// The message of the diagnostic.
    pub message: String,
    /// S
    
fn find_used_input_types<'a>(params: &CheckParams<'a>) -> HashSet<&'a str> {
    fn find_used_input_types_rec<'a>(
        root_type: &'a str,
        params: &CheckParams<'a>,
        used_input_types: &mut HashSet<&'a str>,
    ) {
        if !used_input_types.insert(root_type) {
            return;
        }

        for field in params.source.iter_fields(root_type) {
            find_used_input_types_rec(&field.base_type, params, used_input_types);
        }
    }

    let mut used_input_types = HashSet::new();

    for arg in params.field_usage.count_per_field_argument.keys() {
        let arg = &params.source[*arg];
        let arg_type = &arg.base_type;

        find_used_input_types_rec(arg_type, params, &mut used_input_types);
    }

    used_input_types
}