Skip to content
Myr

Merge pull request #3019 from xibeiyoumian/master

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Tolnay · committed by GitHub · parents 576e2ef, a27948e · Browse files · 2 files+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • chore: improve code comments clarity

Diff stats

2 files+2 added−2 removed

  • tests:+2 added−2 removed

2 files+2 added−2 removed

modified:test_suite/tests/ui/default-attribute/tuple_struct_path.rs+1 added-1 removed
9 unmodified lines
10#[derive(Deserialize)]11struct T1(u8, #[serde(default = "d")] u8);1213// ERROR: The first field can get default value only if sequence is empty, but14// that mean that all other fields cannot be deserialized without errors.14// that means that all other fields cannot be deserialized without errors.15#[derive(Deserialize)]16struct T2(#[serde(default = "d")] u8, u8, u8);1718// No errors expected:
58 unmodified lines
modified:test_suite/tests/ui/default-attribute/tuple_struct.rs+1 added-1 removed
9 unmodified lines
10#[derive(Deserialize)]11struct T1(u8, #[serde(default)] u8);1213// ERROR: The first field can get default value only if sequence is empty, but14// that mean that all other fields cannot be deserialized without errors.14// that means that all other fields cannot be deserialized without errors.15#[derive(Deserialize)]16struct T2(#[serde(default)] u8, u8, u8);1718// No errors expected:
29 unmodified lines