cargo-semver-checks 0.45.0

Scan your Rust crate for semver violations.
Documentation
SemverQuery(
    id: "inherent_method_missing",
    human_readable_name: "pub method removed or renamed",
    description: "A method or associated fn is no longer available under its prior name.",
    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 ImplOwner {
                        visibility_limit @filter(op: "=", value: ["$public"]) @output

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

                        inherent_impl {
                            public_api_eligible @filter(op: "=", value: ["$true"])

                            method {
                                method_visibility: visibility_limit @filter(op: "=", value: ["$public"]) @output
                                method_name: name @output @tag
                                public_api_eligible @filter(op: "=", value: ["$true"])

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

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

                        # We use "impl" instead of "inherent_impl" here because moving
                        # an inherently-implemented method to a trait is not necessarily
                        # a breaking change, so we don't want to report it.
                        impl @fold @transform(op: "count") @filter(op: "=", value: ["$zero"]) {
                            public_api_eligible @filter(op: "=", value: ["$true"])
                            method {
                                visibility_limit @filter(op: "one_of", value: ["$public_or_default"])
                                name @filter(op: "=", value: ["%method_name"])
                            }
                        }
                    }
                }
            }
        }
    }"#,
    arguments: {
        "public": "public",
        "public_or_default": ["public", "default"],
        "zero": 0,
        "true": true,
    },
    error_message: "A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.",
    per_result_error_template: Some("{{name}}::{{method_name}}, previously in file {{span_filename}}:{{span_begin_line}}"),
)