]> git.lizzy.rs Git - rust.git/commitdiff
Replaced a comment mentioning a fixed issue
authorMarkus Westerlind <marwes91@gmail.com>
Sun, 14 Jun 2015 16:24:52 +0000 (18:24 +0200)
committerMarkus <marwes91@gmail.com>
Sun, 14 Jun 2015 16:27:05 +0000 (18:27 +0200)
Replaced it with a comment mentioning the rationale for checking the discriminants first.

src/libsyntax/ext/deriving/generic/mod.rs

index e5b93db4f395d28fb8b273e8499b2fbfa7f44633..e7d242ab70364300b8a08f4b29ba1023d795d3c6 100644 (file)
@@ -1042,10 +1042,12 @@ fn expand_enum_method_body<'b>(&self,
     /// variants where all of the variants match, and one catch-all for
     /// when one does not match.
 
+    /// As an optimization we generate code which checks whether all variants
+    /// match first which makes llvm see that C-like enums can be compiled into
+    /// a simple equality check (for PartialEq).
+
     /// The catch-all handler is provided access the variant index values
-    /// for each of the self-args, carried in precomputed variables. (Nota
-    /// bene: the variant index values are not necessarily the
-    /// discriminant values.  See issue #15523.)
+    /// for each of the self-args, carried in precomputed variables.
 
     /// ```{.text}
     /// let __self0_vi = unsafe {