cargo-semver-checks 0.48.0

Scan your Rust crate for semver violations.
Documentation
SemverQuery(
    id: "trait_removed_supertrait",
    human_readable_name: "supertrait removed or renamed",
    description: "Removing a supertrait bound is a breaking change, since users of the trait can no longer assume it can also be used like its supertrait.",
    required_update: Major,
    lint_level: Deny,
    reference_link: Some("https://doc.rust-lang.org/reference/items/traits.html#supertraits"),
    query: r#"
    {
        CrateDiff {
            baseline {
                item {
                    ... on Trait {
                        visibility_limit @filter(op: "=", value: ["$public"]) @output

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

                        supertrait {
                            trait {
                                importable_path {
                                    trait_path: path @output @tag
                                    public_api @filter(op: "=", value: ["$true"])
                                }
                            }
                        }
                    }
                }
            }
            current {
                item {
                    ... on Trait {
                        visibility_limit @filter(op: "=", value: ["$public"])
                        name @output

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

                        supertrait @fold @transform(op: "count") @filter(op: "=", value: ["$zero"]) {
                            trait {
                                importable_path {
                                    path @filter(op: "=", value: ["%trait_path"])
                                }
                            }
                        }

                        span_: span @optional {
                            filename @output
                            begin_line @output
                            end_line @output
                        }
                    }
                }
            }
        }
    }"#,
    arguments: {
        "public": "public",
        "true": true,
        "zero": 0,
    },
    error_message: "A supertrait was removed from a trait. Users of the trait can no longer assume it can also be used like its supertrait.",
    per_result_error_template: Some("supertrait {{join \"::\" trait_path}} of trait {{name}} in file {{span_filename}}:{{span_begin_line}}"),
)