]> git.lizzy.rs Git - rust.git/blobdiff - src/libsyntax/ext/deriving/show.rs
librustc: Remove unique vector patterns from the language.
[rust.git] / src / libsyntax / ext / deriving / show.rs
index 83d327daf17dcca4adb253e707a427ce75696b94..d5b08503fd03ef623e00331b569cabfaa2521929 100644 (file)
@@ -74,7 +74,8 @@ fn show_substructure(cx: &mut ExtCtxt, span: Span,
     // Getting harder... making the format string:
     match *substr.fields {
         // unit struct/nullary variant: no work necessary!
-        Struct([]) | EnumMatching(_, _, []) => {}
+        Struct(ref fields) if fields.len() == 0 => {}
+        EnumMatching(_, _, ref fields) if fields.len() == 0 => {}
 
         Struct(ref fields) | EnumMatching(_, _, ref fields) => {
             if fields[0].name.is_none() {