use std::fmt::Display;
create_messages!(
#[derive(Hash, PartialEq, Eq)]
ParserWarning,
code_mask: 0000i32,
code_prefix: "PAR",
@formatted
const_parameter_or_input {
args: (),
msg: "`constant` is preferred over `const` for function parameters to indicate a R1CS constant.",
help: None,
}
@formatted
deprecated {
args: (keyword: impl Display, help: impl Display),
msg: format!("The keyword `{keyword}` is deprecated."),
help: Some(help.to_string()),
}
/// For when a record prototype does not constrain any fields beyond the implicit `owner: address`.
@formatted
record_prototype_redundant {
args: (record_name: impl Display),
msg: format!(
"Record prototype `{record_name}` does not constrain any fields beyond the implicit `owner: address`. \
Consider simplifying to `record {record_name};`."
),
help: None,
}
);