cargo-semver-checks 0.48.0

Scan your Rust crate for semver violations.
Documentation
SemverQuery(
    id: "inherent_method_now_unwind",
    human_readable_name: "inherent method ABI is now unwind-capable",
    description: "A public inherent method changed from a non-unwind ABI to the same ABI with unwind ability, which can surprise downstream callers that don't expect unwinding.",
    required_update: Major,
    lint_level: Deny,
    reference_link: Some("https://rust-lang.github.io/rfcs/2945-c-unwind-abi.html"),
    query: r#"
    {
        CrateDiff {
            current {
                item {
                    ... on ImplOwner {
                        visibility_limit @filter(op: "=", value: ["$public"])
                        owner_type: __typename @tag @output
                        name @output

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

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

                                new_abi_: abi {
                                    name @tag(name: "abi_name")
                                    raw_name @output
                                    unwind @filter(op: "=", value: ["$true"])
                                }

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

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

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

                                abi_: abi {
                                    name @filter(op: "=", value: ["%abi_name"])
                                    raw_name @output
                                    unwind @filter(op: "!=", value: ["$true"])
                                }
                            }
                        }
                    }
                }
            }
        }
    }"#,
    arguments: {
        "public": "public",
        "true": true,
    },
    error_message: "A public inherent method now uses an unwind-capable ABI. Callers relying on the previous no-unwind contract may mis-handle unwinding.",
    per_result_error_template: Some("{{join \"::\" path}}::{{method_name}} changed ABI from {{abi_raw_name}} to {{new_abi_raw_name}} in {{span_filename}}:{{span_begin_line}}"),
)