Tweak deriving-all-codegen.rs
.
To include some `Option<>` fields of different types in a single enum. The test output is currently buggy, but the next commit will fix that.
This commit is contained in:
parent
bf286a82e2
commit
dfa9d5c971
@ -85,7 +85,7 @@ enum Mixed {
|
||||
P,
|
||||
Q,
|
||||
R(u32),
|
||||
S { d1: u32, d2: u32 },
|
||||
S { d1: Option<u32>, d2: Option<i32> },
|
||||
}
|
||||
|
||||
// An enum with no fieldless variants. Note that `Default` cannot be derived
|
||||
|
@ -789,8 +789,8 @@ enum Mixed {
|
||||
Q,
|
||||
R(u32),
|
||||
S {
|
||||
d1: u32,
|
||||
d2: u32,
|
||||
d1: Option<u32>,
|
||||
d2: Option<i32>,
|
||||
},
|
||||
}
|
||||
#[automatically_derived]
|
||||
@ -798,6 +798,7 @@ impl ::core::clone::Clone for Mixed {
|
||||
#[inline]
|
||||
fn clone(&self) -> Mixed {
|
||||
let _: ::core::clone::AssertParamIsClone<u32>;
|
||||
let _: ::core::clone::AssertParamIsClone<Option<u32>>;
|
||||
*self
|
||||
}
|
||||
}
|
||||
@ -864,6 +865,7 @@ impl ::core::cmp::Eq for Mixed {
|
||||
#[no_coverage]
|
||||
fn assert_receiver_is_total_eq(&self) -> () {
|
||||
let _: ::core::cmp::AssertParamIsEq<u32>;
|
||||
let _: ::core::cmp::AssertParamIsEq<Option<u32>>;
|
||||
}
|
||||
}
|
||||
#[automatically_derived]
|
||||
|
Loading…
Reference in New Issue
Block a user