SemverQuery(
id: "function_abi_now_unwind",
human_readable_name: "function abi is now unwind-capable",
description: "A pub fn changed from an non-unwind ABI to the same-named ABI with unwind ability. This change might not be compatible with callers of this function, since they may not expect unwinding to happen here.",
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 Function {
visibility_limit @filter(op: "=", value: ["$public"])
name @output
new_abi_: abi {
name @tag(name: "abi")
raw_name @output
unwind @filter(op: "=", value: ["$true"])
}
importable_path {
path @output @tag
public_api @filter(op: "=", value: ["$true"])
}
span_: span @optional {
filename @output
begin_line @output
end_line @output
}
}
}
}
baseline {
item {
... on Function {
visibility_limit @filter(op: "=", value: ["$public"])
abi_: abi {
name @filter(op: "=", value: ["%abi"])
raw_name @output
unwind @filter(op: "!=", value: ["$true"])
}
importable_path {
path @filter(op: "=", value: ["%path"])
public_api @filter(op: "=", value: ["$true"])
}
}
}
}
}
}"#,
arguments: {
"public": "public",
"true": true,
},
error_message: "A pub fn changed from a non-unwind ABI to the same-named ABI with unwind ability. This change might not be compatible with callers of this function, since they may not expect unwinding to happen here.",
per_result_error_template: Some("{{join \"::\" path}} changed ABI from {{abi_raw_name}} to {{new_abi_raw_name}} in {{span_filename}}:{{span_begin_line}}"),
)