cargo-semver-checks 0.40.0

Scan your Rust crate for semver violations.
Documentation
SemverQuery(
    id: "trait_removed_associated_constant",
    human_readable_name: "trait's associated constant was removed",
    description: "A trait's associated constant was removed or renamed",
    required_update: Major,
    lint_level: Deny,
    reference_link: Some("https://doc.rust-lang.org/cargo/reference/semver.html#item-remove"),
    query: r#"
    {
        CrateDiff {
            baseline {
                item {
                    ... on Trait {
                        trait_name: name @output
                        visibility_limit @filter(op: "=", value: ["$public"]) @output

                        importable_path {
                            path @output @tag
                            public_api @filter(op: "=", value: ["$true"])
                        }

                        associated_constant {
                            associated_constant: name @output @tag
                            public_api_eligible @filter(op: "=", value: ["$true"])

                            span_: span @optional {
                                filename @output
                                begin_line @output
                                end_line @output
                            }
                        }
                    }
                }
            }
            current {
                item {
                    ... on Trait {
                        visibility_limit @filter(op: "=", value: ["$public"])

                        importable_path {
                            path @filter(op: "=", value: ["%path"])
                            public_api @filter(op: "=", value: ["$true"])
                        }

                        associated_constant @fold @transform(op: "count") @filter(op: "=", value: ["$zero"]) {
                            name @filter(op: "=", value: ["%associated_constant"])
                        }
                    }
                }
            }
        }
    }"#,
    arguments: {
        "public": "public",
        "true": true,
        "zero": 0,
    },
    error_message: "A public trait's associated constant was removed or renamed.",
    per_result_error_template: Some("associated constant {{trait_name}}::{{associated_constant}}, previously at {{span_filename}}:{{span_begin_line}}"),
)