diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-07-08 15:27:42 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-07-11 14:09:37 +1000 |
| commit | f1d9e2b50c71afe82ead3e99069a3fb1f96301b8 (patch) | |
| tree | a0c208d957eb5214a33c629704dcfbb3a7d7bbaa /src/test | |
| parent | 56178d4259380e07dd4bcced502916326407e59f (diff) | |
| download | rust-f1d9e2b50c71afe82ead3e99069a3fb1f96301b8.tar.gz rust-f1d9e2b50c71afe82ead3e99069a3fb1f96301b8.zip | |
Avoid some unnecessary blocks in derive output.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/deriving/deriving-all-codegen.stdout | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/test/ui/deriving/deriving-all-codegen.stdout b/src/test/ui/deriving/deriving-all-codegen.stdout index 0337ca2634f..0e222d131d7 100644 --- a/src/test/ui/deriving/deriving-all-codegen.stdout +++ b/src/test/ui/deriving/deriving-all-codegen.stdout @@ -697,9 +697,8 @@ impl ::core::fmt::Debug for Enum1 { impl ::core::hash::Hash for Enum1 { fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) -> () { match self { - Enum1::Single { x: __self_0 } => { - ::core::hash::Hash::hash(__self_0, state) - } + Enum1::Single { x: __self_0 } => + ::core::hash::Hash::hash(__self_0, state), } } } @@ -870,10 +869,9 @@ impl ::core::default::Default for Fieldless { impl ::core::hash::Hash for Fieldless { fn hash<__H: ::core::hash::Hasher>(&self, state: &mut __H) -> () { match self { - _ => { + _ => ::core::hash::Hash::hash(&::core::intrinsics::discriminant_value(self), - state) - } + state), } } } @@ -992,10 +990,9 @@ impl ::core::hash::Hash for Mixed { ::core::hash::Hash::hash(__self_0, state); ::core::hash::Hash::hash(__self_1, state) } - _ => { + _ => ::core::hash::Hash::hash(&::core::intrinsics::discriminant_value(self), - state) - } + state), } } } |
