File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/libsyntax/ext/deriving/generic Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1042,10 +1042,12 @@ impl<'a> MethodDef<'a> {
10421042 /// variants where all of the variants match, and one catch-all for
10431043 /// when one does not match.
10441044
1045+ /// As an optimization we generate code which checks whether all variants
1046+ /// match first which makes llvm see that C-like enums can be compiled into
1047+ /// a simple equality check (for PartialEq).
1048+
10451049 /// The catch-all handler is provided access the variant index values
1046- /// for each of the self-args, carried in precomputed variables. (Nota
1047- /// bene: the variant index values are not necessarily the
1048- /// discriminant values. See issue #15523.)
1050+ /// for each of the self-args, carried in precomputed variables.
10491051
10501052 /// ```{.text}
10511053 /// let __self0_vi = unsafe {
You can’t perform that action at this time.
0 commit comments