cargo-semver-checks 0.24.2

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, 
    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
                        }

                        associated_constant {
                            associated_constant: name @output @tag

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

                        importable_path {
                            path @filter(op: "=", value: ["%path"])
                        }
                    
                        associated_constant @fold @transform(op: "count") @filter(op: "=", value: ["$zero"]) {
                            name @filter(op: "=", value: ["%associated_constant"])
                        }
                    }                
                }
            }
        }
    }"#,
    arguments: {
        "public": "public",
        "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}}"),
)