]> git.lizzy.rs Git - rust.git/blobdiff - src/functions.rs
terminating newline bug
[rust.git] / src / functions.rs
index e7f80922e8af2cce971c076a4f7179a5c622be19..492754a39aaa2516fc74c6a2cddc7931353409bc 100644 (file)
@@ -372,8 +372,9 @@ fn rewrite_where_clause(&self,
         result.push_str(&make_indent(indent + 4));
         result.push_str("where ");
 
+        let comments = vec![String::new(); where_clause.predicates.len()];
         // TODO uncomment when spans are fixed
-        //println!("{:?} {:?}", where_clause.predicates.iter().map(|p| self.snippet(span_for_where_pred(p))).collect::<Vec<_>>(), next_span.lo);
+        // println!("{:?} {:?}", where_clause.predicates.iter().map(|p| self.snippet(span_for_where_pred(p))).collect::<Vec<_>>(), next_span.lo);
         // let comments = self.make_comments_for_list(Vec::new(),
         //                                            where_clause.predicates.iter(),
         //                                            ",",
@@ -381,7 +382,6 @@ fn rewrite_where_clause(&self,
         //                                            |pred| span_for_where_pred(pred).lo,
         //                                            |pred| span_for_where_pred(pred).hi,
         //                                            next_span.lo);
-        let comments = vec![String::new(); where_clause.predicates.len()];
         let where_strs: Vec<_> = where_clause.predicates.iter()
                                                         .map(|p| (self.rewrite_pred(p)))
                                                         .zip(comments.into_iter())