parent
56d544f7ad
commit
ead6c4b9d4
53 changed files with 266 additions and 203 deletions
|
|
@ -17,7 +17,7 @@ use syntax::ast_util;
|
|||
use syntax::ast_util::PostExpansionMethod;
|
||||
use syntax::attr;
|
||||
use syntax::attr::{AttributeMethods, AttrMetaMethods};
|
||||
use syntax::codemap::{DUMMY_SP, Pos};
|
||||
use syntax::codemap::{DUMMY_SP, Pos, Spanned};
|
||||
use syntax::parse::token::InternedString;
|
||||
use syntax::parse::token;
|
||||
use syntax::ptr::P;
|
||||
|
|
@ -2045,7 +2045,7 @@ fn name_from_pat(p: &ast::Pat) -> String {
|
|||
PatEnum(ref p, _) => path_to_string(p),
|
||||
PatStruct(ref name, ref fields, etc) => {
|
||||
format!("{} {{ {}{} }}", path_to_string(name),
|
||||
fields.iter().map(|fp|
|
||||
fields.iter().map(|&Spanned { node: ref fp, .. }|
|
||||
format!("{}: {}", fp.ident.as_str(), name_from_pat(&*fp.pat)))
|
||||
.collect::<Vec<String>>().connect(", "),
|
||||
if etc { ", ..." } else { "" }
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ fn summarize_item(item: &Item) -> (Counts, Option<ModuleSummary>) {
|
|||
.sum();
|
||||
(item_counts + subcounts, None)
|
||||
}
|
||||
ModuleItem(Module { items: ref items, .. }) => {
|
||||
ModuleItem(Module { ref items, .. }) => {
|
||||
let mut counts = item_counts;
|
||||
let mut submodules = Vec::new();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue