Skip to content

Commit d7dc33e

Browse files
committed
---
yaml --- r: 219294 b: refs/heads/snap-stage3 c: 34d5b54 h: refs/heads/master v: v3
1 parent 204a993 commit d7dc33e

File tree

2 files changed

+6
-4
lines changed
  • branches/snap-stage3/src/libsyntax/ext/deriving/generic

2 files changed

+6
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: c044791d80ea0dc5c4b57b6030a67b69f8510239
3-
refs/heads/snap-stage3: 7721d46bd76967e73a04b7944651094d3d2f9274
3+
refs/heads/snap-stage3: 34d5b5450cf8728321a77f3e32393197fd66a325
44
refs/heads/try: b53c0f93eedcdedd4fd89bccc5a3a09d1c5cd23e
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/snap-stage3/src/libsyntax/ext/deriving/generic/mod.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)