mirror of
https://github.com/serde-rs/serde.git
synced 2025-09-27 04:50:36 +00:00
More descriptive function name; add doc comment to function
This commit is contained in:
parent
9fc526b788
commit
0ddebe0317
@ -16,7 +16,7 @@ pub fn check(cx: &Ctxt, cont: &Container) {
|
||||
check_getter(cx, cont);
|
||||
check_identifier(cx, cont);
|
||||
check_variant_skip_attrs(cx, cont);
|
||||
check_internally_tagged_variant_name_conflict(cx, cont);
|
||||
check_internal_tag_field_name_conflict(cx, cont);
|
||||
}
|
||||
|
||||
/// Getters are only allowed inside structs (not enums) with the `remote`
|
||||
@ -171,7 +171,11 @@ fn check_variant_skip_attrs(cx: &Ctxt, cont: &Container) {
|
||||
}
|
||||
}
|
||||
|
||||
fn check_internally_tagged_variant_name_conflict(
|
||||
/// The tag of an internally-tagged struct variant must not be
|
||||
/// the same as either one of its fields, as this would result in
|
||||
/// duplicate keys in the serialized output and/or ambiguity in
|
||||
/// the to-be-deserialized input.
|
||||
fn check_internal_tag_field_name_conflict(
|
||||
cx: &Ctxt,
|
||||
cont: &Container,
|
||||
) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user