Use ThinVec
in ast::Path
.
This commit is contained in:
parent
6b7ca2fcf2
commit
67d5cc0462
@ -3476,6 +3476,7 @@ dependencies = [
|
||||
"rustc_session",
|
||||
"rustc_span",
|
||||
"smallvec",
|
||||
"thin-vec",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
@ -3916,6 +3917,7 @@ dependencies = [
|
||||
"rustc_macros",
|
||||
"rustc_session",
|
||||
"rustc_span",
|
||||
"thin-vec",
|
||||
"tracing",
|
||||
"unicode-normalization",
|
||||
"unicode-width",
|
||||
@ -4051,6 +4053,7 @@ dependencies = [
|
||||
"rustc_session",
|
||||
"rustc_span",
|
||||
"smallvec",
|
||||
"thin-vec",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
use std::convert::TryFrom;
|
||||
use std::fmt;
|
||||
use std::mem;
|
||||
use thin_vec::ThinVec;
|
||||
use thin_vec::{thin_vec, ThinVec};
|
||||
|
||||
/// A "Label" is an identifier of some point in sources,
|
||||
/// e.g. in the following code:
|
||||
@ -90,7 +90,7 @@ pub struct Path {
|
||||
pub span: Span,
|
||||
/// The segments in the path: the things separated by `::`.
|
||||
/// Global paths begin with `kw::PathRoot`.
|
||||
pub segments: Vec<PathSegment>,
|
||||
pub segments: ThinVec<PathSegment>,
|
||||
pub tokens: Option<LazyAttrTokenStream>,
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ impl Path {
|
||||
// Convert a span and an identifier to the corresponding
|
||||
// one-segment path.
|
||||
pub fn from_ident(ident: Ident) -> Path {
|
||||
Path { segments: vec![PathSegment::from_ident(ident)], span: ident.span, tokens: None }
|
||||
Path { segments: thin_vec![PathSegment::from_ident(ident)], span: ident.span, tokens: None }
|
||||
}
|
||||
|
||||
pub fn is_global(&self) -> bool {
|
||||
@ -3046,28 +3046,28 @@ mod size_asserts {
|
||||
static_assert_size!(AssocItemKind, 32);
|
||||
static_assert_size!(Attribute, 32);
|
||||
static_assert_size!(Block, 48);
|
||||
static_assert_size!(Expr, 88);
|
||||
static_assert_size!(ExprKind, 56);
|
||||
static_assert_size!(Expr, 72);
|
||||
static_assert_size!(ExprKind, 40);
|
||||
static_assert_size!(Fn, 184);
|
||||
static_assert_size!(ForeignItem, 96);
|
||||
static_assert_size!(ForeignItemKind, 24);
|
||||
static_assert_size!(GenericArg, 24);
|
||||
static_assert_size!(GenericBound, 88);
|
||||
static_assert_size!(GenericBound, 72);
|
||||
static_assert_size!(Generics, 72);
|
||||
static_assert_size!(Impl, 200);
|
||||
static_assert_size!(Impl, 184);
|
||||
static_assert_size!(Item, 184);
|
||||
static_assert_size!(ItemKind, 112);
|
||||
static_assert_size!(Lit, 48);
|
||||
static_assert_size!(LitKind, 24);
|
||||
static_assert_size!(Local, 72);
|
||||
static_assert_size!(Param, 40);
|
||||
static_assert_size!(Pat, 104);
|
||||
static_assert_size!(Path, 40);
|
||||
static_assert_size!(Pat, 88);
|
||||
static_assert_size!(Path, 24);
|
||||
static_assert_size!(PathSegment, 24);
|
||||
static_assert_size!(PatKind, 80);
|
||||
static_assert_size!(PatKind, 64);
|
||||
static_assert_size!(Stmt, 32);
|
||||
static_assert_size!(StmtKind, 16);
|
||||
static_assert_size!(Ty, 80);
|
||||
static_assert_size!(TyKind, 56);
|
||||
static_assert_size!(Ty, 64);
|
||||
static_assert_size!(TyKind, 40);
|
||||
// tidy-alphabetical-end
|
||||
}
|
||||
|
@ -10,19 +10,18 @@
|
||||
use crate::tokenstream::{DelimSpan, Spacing, TokenTree};
|
||||
use crate::tokenstream::{LazyAttrTokenStream, TokenStream};
|
||||
use crate::util::comments;
|
||||
|
||||
use rustc_data_structures::sync::WorkerLocal;
|
||||
use rustc_index::bit_set::GrowableBitSet;
|
||||
use rustc_span::source_map::BytePos;
|
||||
use rustc_span::symbol::{sym, Ident, Symbol};
|
||||
use rustc_span::Span;
|
||||
|
||||
use std::cell::Cell;
|
||||
use std::iter;
|
||||
#[cfg(debug_assertions)]
|
||||
use std::ops::BitXor;
|
||||
#[cfg(debug_assertions)]
|
||||
use std::sync::atomic::{AtomicU32, Ordering};
|
||||
use thin_vec::thin_vec;
|
||||
|
||||
pub struct MarkedAttrs(GrowableBitSet<AttrId>);
|
||||
|
||||
@ -471,12 +470,12 @@ fn from_tokens<I>(tokens: &mut iter::Peekable<I>) -> Option<MetaItem>
|
||||
tokens.peek()
|
||||
{
|
||||
tokens.next();
|
||||
vec![PathSegment::from_ident(Ident::new(name, span))]
|
||||
thin_vec![PathSegment::from_ident(Ident::new(name, span))]
|
||||
} else {
|
||||
break 'arm Path::from_ident(Ident::new(name, span));
|
||||
}
|
||||
} else {
|
||||
vec![PathSegment::path_root(span)]
|
||||
thin_vec![PathSegment::path_root(span)]
|
||||
};
|
||||
loop {
|
||||
if let Some(TokenTree::Token(Token { kind: token::Ident(name, _), span }, _)) =
|
||||
|
@ -20,8 +20,8 @@
|
||||
use rustc_span::{Span, Symbol};
|
||||
use rustc_target::spec::abi;
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
|
||||
use std::iter;
|
||||
use thin_vec::ThinVec;
|
||||
|
||||
pub(super) struct ItemLowerer<'a, 'hir> {
|
||||
pub(super) tcx: TyCtxt<'hir>,
|
||||
@ -243,7 +243,7 @@ fn lower_item_kind(
|
||||
ItemKind::ExternCrate(orig_name) => hir::ItemKind::ExternCrate(orig_name),
|
||||
ItemKind::Use(ref use_tree) => {
|
||||
// Start with an empty prefix.
|
||||
let prefix = Path { segments: vec![], span: use_tree.span, tokens: None };
|
||||
let prefix = Path { segments: ThinVec::new(), span: use_tree.span, tokens: None };
|
||||
|
||||
self.lower_use_tree(use_tree, &prefix, id, vis_span, ident, attrs)
|
||||
}
|
||||
|
@ -8,20 +8,21 @@ build = false
|
||||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
rustc_serialize = { path = "../rustc_serialize" }
|
||||
tracing = "0.1"
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
|
||||
crossbeam-channel = "0.5.0"
|
||||
rustc_ast_passes = { path = "../rustc_ast_passes" }
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
|
||||
rustc_attr = { path = "../rustc_attr" }
|
||||
rustc_data_structures = { path = "../rustc_data_structures" }
|
||||
rustc_errors = { path = "../rustc_errors" }
|
||||
rustc_feature = { path = "../rustc_feature" }
|
||||
rustc_lexer = { path = "../rustc_lexer" }
|
||||
rustc_lint_defs = { path = "../rustc_lint_defs" }
|
||||
rustc_macros = { path = "../rustc_macros" }
|
||||
rustc_lexer = { path = "../rustc_lexer" }
|
||||
rustc_parse = { path = "../rustc_parse" }
|
||||
rustc_serialize = { path = "../rustc_serialize" }
|
||||
rustc_session = { path = "../rustc_session" }
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
crossbeam-channel = "0.5.0"
|
||||
thin-vec = "0.2.8"
|
||||
tracing = "0.1"
|
||||
|
@ -1,13 +1,12 @@
|
||||
use crate::base::ExtCtxt;
|
||||
|
||||
use rustc_ast::attr;
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::{self as ast, AttrVec, BlockCheckMode, Expr, LocalKind, PatKind, UnOp};
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||
|
||||
use rustc_span::Span;
|
||||
use thin_vec::ThinVec;
|
||||
|
||||
impl<'a> ExtCtxt<'a> {
|
||||
pub fn path(&self, span: Span, strs: Vec<Ident>) -> ast::Path {
|
||||
@ -28,7 +27,7 @@ pub fn path_all(
|
||||
) -> ast::Path {
|
||||
assert!(!idents.is_empty());
|
||||
let add_root = global && !idents[0].is_path_segment_keyword();
|
||||
let mut segments = Vec::with_capacity(idents.len() + add_root as usize);
|
||||
let mut segments = ThinVec::with_capacity(idents.len() + add_root as usize);
|
||||
if add_root {
|
||||
segments.push(ast::PathSegment::path_root(span));
|
||||
}
|
||||
|
@ -1,14 +1,12 @@
|
||||
use crate::expand::{AstFragment, AstFragmentKind};
|
||||
|
||||
use rustc_ast as ast;
|
||||
use rustc_ast::mut_visit::*;
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_span::source_map::DUMMY_SP;
|
||||
use rustc_span::symbol::Ident;
|
||||
|
||||
use smallvec::{smallvec, SmallVec};
|
||||
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use thin_vec::ThinVec;
|
||||
|
||||
pub fn placeholder(
|
||||
kind: AstFragmentKind,
|
||||
@ -17,7 +15,7 @@ pub fn placeholder(
|
||||
) -> AstFragment {
|
||||
fn mac_placeholder() -> P<ast::MacCall> {
|
||||
P(ast::MacCall {
|
||||
path: ast::Path { span: DUMMY_SP, segments: Vec::new(), tokens: None },
|
||||
path: ast::Path { span: DUMMY_SP, segments: ThinVec::new(), tokens: None },
|
||||
args: P(ast::MacArgs::Empty),
|
||||
prior_type_ascription: None,
|
||||
})
|
||||
|
@ -7,15 +7,16 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
bitflags = "1.0"
|
||||
tracing = "0.1"
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
|
||||
rustc_data_structures = { path = "../rustc_data_structures" }
|
||||
rustc_errors = { path = "../rustc_errors" }
|
||||
rustc_feature = { path = "../rustc_feature" }
|
||||
rustc_lexer = { path = "../rustc_lexer" }
|
||||
rustc_macros = { path = "../rustc_macros" }
|
||||
rustc_errors = { path = "../rustc_errors" }
|
||||
rustc_session = { path = "../rustc_session" }
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
thin-vec = "0.2.8"
|
||||
tracing = "0.1"
|
||||
unicode-normalization = "0.1.11"
|
||||
unicode-width = "0.1.4"
|
||||
|
@ -18,6 +18,7 @@
|
||||
};
|
||||
|
||||
use crate::lexer::UnmatchedBrace;
|
||||
use crate::parser;
|
||||
use rustc_ast as ast;
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::token::{self, Delimiter, Lit, LitKind, TokenKind};
|
||||
@ -37,11 +38,10 @@
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::symbol::{kw, sym, Ident};
|
||||
use rustc_span::{Span, SpanSnippetError, DUMMY_SP};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
use std::mem::take;
|
||||
|
||||
use crate::parser;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use thin_vec::{thin_vec, ThinVec};
|
||||
use tracing::{debug, trace};
|
||||
|
||||
/// Creates a placeholder argument.
|
||||
pub(super) fn dummy_arg(ident: Ident) -> Param {
|
||||
@ -638,8 +638,11 @@ pub fn maybe_suggest_struct_literal(
|
||||
// field: value,
|
||||
// }
|
||||
let mut snapshot = self.create_snapshot_for_diagnostic();
|
||||
let path =
|
||||
Path { segments: vec![], span: self.prev_token.span.shrink_to_lo(), tokens: None };
|
||||
let path = Path {
|
||||
segments: ThinVec::new(),
|
||||
span: self.prev_token.span.shrink_to_lo(),
|
||||
tokens: None,
|
||||
};
|
||||
let struct_expr = snapshot.parse_struct_expr(None, path, false);
|
||||
let block_tail = self.parse_block_tail(lo, s, AttemptLocalParseRecovery::No);
|
||||
return Some(match (struct_expr, block_tail) {
|
||||
@ -1426,7 +1429,7 @@ pub(super) fn maybe_recover_from_bad_qpath_stage_2<T: RecoverQPath>(
|
||||
) -> PResult<'a, P<T>> {
|
||||
self.expect(&token::ModSep)?;
|
||||
|
||||
let mut path = ast::Path { segments: Vec::new(), span: DUMMY_SP, tokens: None };
|
||||
let mut path = ast::Path { segments: ThinVec::new(), span: DUMMY_SP, tokens: None };
|
||||
self.parse_path_segments(&mut path.segments, T::PATH_STYLE, None)?;
|
||||
path.span = ty_span.to(self.prev_token.span);
|
||||
|
||||
@ -2434,7 +2437,7 @@ pub(crate) fn maybe_recover_colon_colon_in_pat_typo(
|
||||
None,
|
||||
Path {
|
||||
span: new_span,
|
||||
segments: vec![
|
||||
segments: thin_vec![
|
||||
PathSegment::from_ident(*old_ident),
|
||||
PathSegment::from_ident(*ident),
|
||||
],
|
||||
|
@ -3,7 +3,6 @@
|
||||
use super::diagnostics::{dummy_arg, ConsumeClosingDelim};
|
||||
use super::ty::{AllowPlus, RecoverQPath, RecoverReturnSign};
|
||||
use super::{AttrWrapper, FollowedByType, ForceCollect, Parser, PathStyle, TrailingToken};
|
||||
|
||||
use rustc_ast::ast::*;
|
||||
use rustc_ast::ptr::P;
|
||||
use rustc_ast::token::{self, Delimiter, TokenKind};
|
||||
@ -22,9 +21,10 @@
|
||||
use rustc_span::source_map::{self, Span};
|
||||
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||
use rustc_span::DUMMY_SP;
|
||||
|
||||
use std::convert::TryFrom;
|
||||
use std::mem;
|
||||
use thin_vec::ThinVec;
|
||||
use tracing::debug;
|
||||
|
||||
impl<'a> Parser<'a> {
|
||||
/// Parses a source module as a crate. This is the main entry point for the parser.
|
||||
@ -972,7 +972,8 @@ fn parse_type_alias(&mut self, defaultness: Defaultness) -> PResult<'a, ItemInfo
|
||||
fn parse_use_tree(&mut self) -> PResult<'a, UseTree> {
|
||||
let lo = self.token.span;
|
||||
|
||||
let mut prefix = ast::Path { segments: Vec::new(), span: lo.shrink_to_lo(), tokens: None };
|
||||
let mut prefix =
|
||||
ast::Path { segments: ThinVec::new(), span: lo.shrink_to_lo(), tokens: None };
|
||||
let kind = if self.check(&token::OpenDelim(Delimiter::Brace))
|
||||
|| self.check(&token::BinOp(token::Star))
|
||||
|| self.is_import_coupler()
|
||||
|
@ -11,8 +11,9 @@
|
||||
use rustc_errors::{pluralize, Applicability, PResult};
|
||||
use rustc_span::source_map::{BytePos, Span};
|
||||
use rustc_span::symbol::{kw, sym, Ident};
|
||||
|
||||
use std::mem;
|
||||
use thin_vec::ThinVec;
|
||||
use tracing::debug;
|
||||
|
||||
/// Specifies how to parse a path.
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
@ -63,7 +64,7 @@ pub(super) fn parse_qpath(&mut self, style: PathStyle) -> PResult<'a, (P<QSelf>,
|
||||
path_span = path_lo.to(self.prev_token.span);
|
||||
} else {
|
||||
path_span = self.token.span.to(self.token.span);
|
||||
path = ast::Path { segments: Vec::new(), span: path_span, tokens: None };
|
||||
path = ast::Path { segments: ThinVec::new(), span: path_span, tokens: None };
|
||||
}
|
||||
|
||||
// See doc comment for `unmatched_angle_bracket_count`.
|
||||
@ -179,7 +180,7 @@ pub(super) fn parse_path_inner(
|
||||
}
|
||||
|
||||
let lo = self.token.span;
|
||||
let mut segments = Vec::new();
|
||||
let mut segments = ThinVec::new();
|
||||
let mod_sep_ctxt = self.token.span.ctxt();
|
||||
if self.eat(&token::ModSep) {
|
||||
segments.push(PathSegment::path_root(lo.shrink_to_lo().with_ctxt(mod_sep_ctxt)));
|
||||
@ -191,7 +192,7 @@ pub(super) fn parse_path_inner(
|
||||
|
||||
pub(super) fn parse_path_segments(
|
||||
&mut self,
|
||||
segments: &mut Vec<PathSegment>,
|
||||
segments: &mut ThinVec<PathSegment>,
|
||||
style: PathStyle,
|
||||
ty_generics: Option<&Generics>,
|
||||
) -> PResult<'a, ()> {
|
||||
|
@ -7,10 +7,8 @@ edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
bitflags = "1.2.1"
|
||||
tracing = "0.1"
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
rustc_arena = { path = "../rustc_arena" }
|
||||
rustc_middle = { path = "../rustc_middle" }
|
||||
rustc_ast = { path = "../rustc_ast" }
|
||||
rustc_ast_pretty = { path = "../rustc_ast_pretty" }
|
||||
rustc_attr = { path = "../rustc_attr" }
|
||||
rustc_data_structures = { path = "../rustc_data_structures" }
|
||||
@ -20,7 +18,10 @@ rustc_feature = { path = "../rustc_feature" }
|
||||
rustc_hir = { path = "../rustc_hir" }
|
||||
rustc_index = { path = "../rustc_index" }
|
||||
rustc_metadata = { path = "../rustc_metadata" }
|
||||
rustc_middle = { path = "../rustc_middle" }
|
||||
rustc_query_system = { path = "../rustc_query_system" }
|
||||
rustc_session = { path = "../rustc_session" }
|
||||
rustc_span = { path = "../rustc_span" }
|
||||
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
|
||||
thin-vec = "0.2.8"
|
||||
tracing = "0.1"
|
||||
|
@ -25,6 +25,7 @@
|
||||
use rustc_span::source_map::SourceMap;
|
||||
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||
use rustc_span::{BytePos, Span, SyntaxContext};
|
||||
use thin_vec::ThinVec;
|
||||
|
||||
use crate::imports::{Import, ImportKind, ImportResolver};
|
||||
use crate::late::{PatternSource, Rib};
|
||||
@ -1295,7 +1296,7 @@ fn lookup_import_candidates_from_module<FilterFn>(
|
||||
{
|
||||
let mut candidates = Vec::new();
|
||||
let mut seen_modules = FxHashSet::default();
|
||||
let mut worklist = vec![(start_module, Vec::<ast::PathSegment>::new(), true)];
|
||||
let mut worklist = vec![(start_module, ThinVec::<ast::PathSegment>::new(), true)];
|
||||
let mut worklist_via_import = vec![];
|
||||
|
||||
while let Some((in_module, path_segments, accessible)) = match worklist.pop() {
|
||||
|
@ -33,6 +33,8 @@
|
||||
use std::iter;
|
||||
use std::ops::Deref;
|
||||
|
||||
use thin_vec::ThinVec;
|
||||
|
||||
type Res = def::Res<ast::NodeId>;
|
||||
|
||||
/// A field or associated item from self type suggested in case of resolution failure.
|
||||
@ -78,7 +80,7 @@ fn import_candidate_to_enum_paths(suggestion: &ImportSuggestion) -> (String, Str
|
||||
let path_len = suggestion.path.segments.len();
|
||||
let enum_path = ast::Path {
|
||||
span: suggestion.path.span,
|
||||
segments: suggestion.path.segments[0..path_len - 1].to_vec(),
|
||||
segments: suggestion.path.segments[0..path_len - 1].iter().cloned().collect(),
|
||||
tokens: None,
|
||||
};
|
||||
let enum_path_string = path_names_to_string(&enum_path);
|
||||
@ -1831,7 +1833,7 @@ fn let_binding_suggestion(&mut self, err: &mut Diagnostic, ident_span: Span) ->
|
||||
fn find_module(&mut self, def_id: DefId) -> Option<(Module<'a>, ImportSuggestion)> {
|
||||
let mut result = None;
|
||||
let mut seen_modules = FxHashSet::default();
|
||||
let mut worklist = vec![(self.r.graph_root, Vec::new())];
|
||||
let mut worklist = vec![(self.r.graph_root, ThinVec::new())];
|
||||
|
||||
while let Some((in_module, path_segments)) = worklist.pop() {
|
||||
// abort if the module is already found
|
||||
|
@ -25,6 +25,7 @@
|
||||
extern crate rustc_parse;
|
||||
extern crate rustc_session;
|
||||
extern crate rustc_span;
|
||||
extern crate thin_vec;
|
||||
|
||||
use rustc_ast::mut_visit::{self, visit_clobber, MutVisitor};
|
||||
use rustc_ast::ptr::P;
|
||||
@ -35,6 +36,7 @@
|
||||
use rustc_span::source_map::FilePathMapping;
|
||||
use rustc_span::source_map::{FileName, Spanned, DUMMY_SP};
|
||||
use rustc_span::symbol::Ident;
|
||||
use thin_vec::thin_vec;
|
||||
|
||||
fn parse_expr(ps: &ParseSess, src: &str) -> Option<P<Expr>> {
|
||||
let src_as_string = src.to_string();
|
||||
@ -51,7 +53,7 @@ fn expr(kind: ExprKind) -> P<Expr> {
|
||||
|
||||
fn make_x() -> P<Expr> {
|
||||
let seg = PathSegment::from_ident(Ident::from_str("x"));
|
||||
let path = Path { segments: vec![seg], span: DUMMY_SP, tokens: None };
|
||||
let path = Path { segments: thin_vec![seg], span: DUMMY_SP, tokens: None };
|
||||
expr(ExprKind::Path(None, path))
|
||||
}
|
||||
|
||||
|
@ -2,118 +2,118 @@ ast-stats-1 PRE EXPANSION AST STATS
|
||||
ast-stats-1 Name Accumulated Size Count Item Size
|
||||
ast-stats-1 ----------------------------------------------------------------
|
||||
ast-stats-1 ExprField 48 ( 0.6%) 1 48
|
||||
ast-stats-1 Crate 56 ( 0.7%) 1 56
|
||||
ast-stats-1 Attribute 64 ( 0.8%) 2 32
|
||||
ast-stats-1 Crate 56 ( 0.8%) 1 56
|
||||
ast-stats-1 Attribute 64 ( 0.9%) 2 32
|
||||
ast-stats-1 - Normal 32 ( 0.4%) 1
|
||||
ast-stats-1 - DocComment 32 ( 0.4%) 1
|
||||
ast-stats-1 GenericArgs 64 ( 0.8%) 1 64
|
||||
ast-stats-1 - AngleBracketed 64 ( 0.8%) 1
|
||||
ast-stats-1 Local 72 ( 0.9%) 1 72
|
||||
ast-stats-1 WherePredicate 72 ( 0.9%) 1 72
|
||||
ast-stats-1 - BoundPredicate 72 ( 0.9%) 1
|
||||
ast-stats-1 Arm 96 ( 1.2%) 2 48
|
||||
ast-stats-1 ForeignItem 96 ( 1.2%) 1 96
|
||||
ast-stats-1 - Fn 96 ( 1.2%) 1
|
||||
ast-stats-1 FieldDef 160 ( 2.0%) 2 80
|
||||
ast-stats-1 Stmt 160 ( 2.0%) 5 32
|
||||
ast-stats-1 GenericArgs 64 ( 0.9%) 1 64
|
||||
ast-stats-1 - AngleBracketed 64 ( 0.9%) 1
|
||||
ast-stats-1 Local 72 ( 1.0%) 1 72
|
||||
ast-stats-1 WherePredicate 72 ( 1.0%) 1 72
|
||||
ast-stats-1 - BoundPredicate 72 ( 1.0%) 1
|
||||
ast-stats-1 Arm 96 ( 1.3%) 2 48
|
||||
ast-stats-1 ForeignItem 96 ( 1.3%) 1 96
|
||||
ast-stats-1 - Fn 96 ( 1.3%) 1
|
||||
ast-stats-1 FieldDef 160 ( 2.2%) 2 80
|
||||
ast-stats-1 Stmt 160 ( 2.2%) 5 32
|
||||
ast-stats-1 - Local 32 ( 0.4%) 1
|
||||
ast-stats-1 - MacCall 32 ( 0.4%) 1
|
||||
ast-stats-1 - Expr 96 ( 1.2%) 3
|
||||
ast-stats-1 Param 160 ( 2.0%) 4 40
|
||||
ast-stats-1 FnDecl 200 ( 2.5%) 5 40
|
||||
ast-stats-1 Variant 240 ( 3.0%) 2 120
|
||||
ast-stats-1 Block 288 ( 3.6%) 6 48
|
||||
ast-stats-1 GenericBound 352 ( 4.4%) 4 88
|
||||
ast-stats-1 - Trait 352 ( 4.4%) 4
|
||||
ast-stats-1 AssocItem 416 ( 5.2%) 4 104
|
||||
ast-stats-1 - Type 208 ( 2.6%) 2
|
||||
ast-stats-1 - Fn 208 ( 2.6%) 2
|
||||
ast-stats-1 GenericParam 480 ( 6.0%) 5 96
|
||||
ast-stats-1 Expr 704 ( 8.9%) 8 88
|
||||
ast-stats-1 - Path 88 ( 1.1%) 1
|
||||
ast-stats-1 - Match 88 ( 1.1%) 1
|
||||
ast-stats-1 - Struct 88 ( 1.1%) 1
|
||||
ast-stats-1 - Lit 176 ( 2.2%) 2
|
||||
ast-stats-1 - Block 264 ( 3.3%) 3
|
||||
ast-stats-1 PathSegment 720 ( 9.1%) 30 24
|
||||
ast-stats-1 Pat 728 ( 9.2%) 7 104
|
||||
ast-stats-1 - Struct 104 ( 1.3%) 1
|
||||
ast-stats-1 - Wild 104 ( 1.3%) 1
|
||||
ast-stats-1 - Ident 520 ( 6.5%) 5
|
||||
ast-stats-1 Ty 1_120 (14.1%) 14 80
|
||||
ast-stats-1 - Rptr 80 ( 1.0%) 1
|
||||
ast-stats-1 - Ptr 80 ( 1.0%) 1
|
||||
ast-stats-1 - ImplicitSelf 160 ( 2.0%) 2
|
||||
ast-stats-1 - Path 800 (10.1%) 10
|
||||
ast-stats-1 Item 1_656 (20.8%) 9 184
|
||||
ast-stats-1 - Trait 184 ( 2.3%) 1
|
||||
ast-stats-1 - Enum 184 ( 2.3%) 1
|
||||
ast-stats-1 - ForeignMod 184 ( 2.3%) 1
|
||||
ast-stats-1 - Impl 184 ( 2.3%) 1
|
||||
ast-stats-1 - Fn 368 ( 4.6%) 2
|
||||
ast-stats-1 - Use 552 ( 6.9%) 3
|
||||
ast-stats-1 - Expr 96 ( 1.3%) 3
|
||||
ast-stats-1 Param 160 ( 2.2%) 4 40
|
||||
ast-stats-1 FnDecl 200 ( 2.7%) 5 40
|
||||
ast-stats-1 Variant 240 ( 3.2%) 2 120
|
||||
ast-stats-1 GenericBound 288 ( 3.9%) 4 72
|
||||
ast-stats-1 - Trait 288 ( 3.9%) 4
|
||||
ast-stats-1 Block 288 ( 3.9%) 6 48
|
||||
ast-stats-1 AssocItem 416 ( 5.6%) 4 104
|
||||
ast-stats-1 - Type 208 ( 2.8%) 2
|
||||
ast-stats-1 - Fn 208 ( 2.8%) 2
|
||||
ast-stats-1 GenericParam 480 ( 6.5%) 5 96
|
||||
ast-stats-1 Expr 576 ( 7.8%) 8 72
|
||||
ast-stats-1 - Path 72 ( 1.0%) 1
|
||||
ast-stats-1 - Match 72 ( 1.0%) 1
|
||||
ast-stats-1 - Struct 72 ( 1.0%) 1
|
||||
ast-stats-1 - Lit 144 ( 1.9%) 2
|
||||
ast-stats-1 - Block 216 ( 2.9%) 3
|
||||
ast-stats-1 Pat 616 ( 8.3%) 7 88
|
||||
ast-stats-1 - Struct 88 ( 1.2%) 1
|
||||
ast-stats-1 - Wild 88 ( 1.2%) 1
|
||||
ast-stats-1 - Ident 440 ( 5.9%) 5
|
||||
ast-stats-1 PathSegment 720 ( 9.7%) 30 24
|
||||
ast-stats-1 Ty 896 (12.1%) 14 64
|
||||
ast-stats-1 - Rptr 64 ( 0.9%) 1
|
||||
ast-stats-1 - Ptr 64 ( 0.9%) 1
|
||||
ast-stats-1 - ImplicitSelf 128 ( 1.7%) 2
|
||||
ast-stats-1 - Path 640 ( 8.6%) 10
|
||||
ast-stats-1 Item 1_656 (22.3%) 9 184
|
||||
ast-stats-1 - Trait 184 ( 2.5%) 1
|
||||
ast-stats-1 - Enum 184 ( 2.5%) 1
|
||||
ast-stats-1 - ForeignMod 184 ( 2.5%) 1
|
||||
ast-stats-1 - Impl 184 ( 2.5%) 1
|
||||
ast-stats-1 - Fn 368 ( 5.0%) 2
|
||||
ast-stats-1 - Use 552 ( 7.4%) 3
|
||||
ast-stats-1 ----------------------------------------------------------------
|
||||
ast-stats-1 Total 7_952
|
||||
ast-stats-1 Total 7_424
|
||||
ast-stats-1
|
||||
ast-stats-2 POST EXPANSION AST STATS
|
||||
ast-stats-2 Name Accumulated Size Count Item Size
|
||||
ast-stats-2 ----------------------------------------------------------------
|
||||
ast-stats-2 ExprField 48 ( 0.6%) 1 48
|
||||
ast-stats-2 Crate 56 ( 0.6%) 1 56
|
||||
ast-stats-2 GenericArgs 64 ( 0.7%) 1 64
|
||||
ast-stats-2 - AngleBracketed 64 ( 0.7%) 1
|
||||
ast-stats-2 Local 72 ( 0.8%) 1 72
|
||||
ast-stats-2 WherePredicate 72 ( 0.8%) 1 72
|
||||
ast-stats-2 - BoundPredicate 72 ( 0.8%) 1
|
||||
ast-stats-2 Arm 96 ( 1.1%) 2 48
|
||||
ast-stats-2 ForeignItem 96 ( 1.1%) 1 96
|
||||
ast-stats-2 - Fn 96 ( 1.1%) 1
|
||||
ast-stats-2 InlineAsm 120 ( 1.4%) 1 120
|
||||
ast-stats-2 Attribute 128 ( 1.5%) 4 32
|
||||
ast-stats-2 Crate 56 ( 0.7%) 1 56
|
||||
ast-stats-2 GenericArgs 64 ( 0.8%) 1 64
|
||||
ast-stats-2 - AngleBracketed 64 ( 0.8%) 1
|
||||
ast-stats-2 Local 72 ( 0.9%) 1 72
|
||||
ast-stats-2 WherePredicate 72 ( 0.9%) 1 72
|
||||
ast-stats-2 - BoundPredicate 72 ( 0.9%) 1
|
||||
ast-stats-2 Arm 96 ( 1.2%) 2 48
|
||||
ast-stats-2 ForeignItem 96 ( 1.2%) 1 96
|
||||
ast-stats-2 - Fn 96 ( 1.2%) 1
|
||||
ast-stats-2 InlineAsm 120 ( 1.5%) 1 120
|
||||
ast-stats-2 Attribute 128 ( 1.6%) 4 32
|
||||
ast-stats-2 - DocComment 32 ( 0.4%) 1
|
||||
ast-stats-2 - Normal 96 ( 1.1%) 3
|
||||
ast-stats-2 FieldDef 160 ( 1.8%) 2 80
|
||||
ast-stats-2 Stmt 160 ( 1.8%) 5 32
|
||||
ast-stats-2 - Normal 96 ( 1.2%) 3
|
||||
ast-stats-2 FieldDef 160 ( 2.0%) 2 80
|
||||
ast-stats-2 Stmt 160 ( 2.0%) 5 32
|
||||
ast-stats-2 - Local 32 ( 0.4%) 1
|
||||
ast-stats-2 - Semi 32 ( 0.4%) 1
|
||||
ast-stats-2 - Expr 96 ( 1.1%) 3
|
||||
ast-stats-2 Param 160 ( 1.8%) 4 40
|
||||
ast-stats-2 FnDecl 200 ( 2.3%) 5 40
|
||||
ast-stats-2 Variant 240 ( 2.8%) 2 120
|
||||
ast-stats-2 Block 288 ( 3.3%) 6 48
|
||||
ast-stats-2 GenericBound 352 ( 4.1%) 4 88
|
||||
ast-stats-2 - Trait 352 ( 4.1%) 4
|
||||
ast-stats-2 AssocItem 416 ( 4.8%) 4 104
|
||||
ast-stats-2 - Type 208 ( 2.4%) 2
|
||||
ast-stats-2 - Fn 208 ( 2.4%) 2
|
||||
ast-stats-2 GenericParam 480 ( 5.5%) 5 96
|
||||
ast-stats-2 Pat 728 ( 8.4%) 7 104
|
||||
ast-stats-2 - Struct 104 ( 1.2%) 1
|
||||
ast-stats-2 - Wild 104 ( 1.2%) 1
|
||||
ast-stats-2 - Ident 520 ( 6.0%) 5
|
||||
ast-stats-2 PathSegment 792 ( 9.1%) 33 24
|
||||
ast-stats-2 Expr 792 ( 9.1%) 9 88
|
||||
ast-stats-2 - Path 88 ( 1.0%) 1
|
||||
ast-stats-2 - Match 88 ( 1.0%) 1
|
||||
ast-stats-2 - Struct 88 ( 1.0%) 1
|
||||
ast-stats-2 - InlineAsm 88 ( 1.0%) 1
|
||||
ast-stats-2 - Lit 176 ( 2.0%) 2
|
||||
ast-stats-2 - Block 264 ( 3.0%) 3
|
||||
ast-stats-2 Ty 1_120 (12.9%) 14 80
|
||||
ast-stats-2 - Rptr 80 ( 0.9%) 1
|
||||
ast-stats-2 - Ptr 80 ( 0.9%) 1
|
||||
ast-stats-2 - ImplicitSelf 160 ( 1.8%) 2
|
||||
ast-stats-2 - Path 800 ( 9.2%) 10
|
||||
ast-stats-2 Item 2_024 (23.4%) 11 184
|
||||
ast-stats-2 - Trait 184 ( 2.1%) 1
|
||||
ast-stats-2 - Enum 184 ( 2.1%) 1
|
||||
ast-stats-2 - ExternCrate 184 ( 2.1%) 1
|
||||
ast-stats-2 - ForeignMod 184 ( 2.1%) 1
|
||||
ast-stats-2 - Impl 184 ( 2.1%) 1
|
||||
ast-stats-2 - Fn 368 ( 4.2%) 2
|
||||
ast-stats-2 - Use 736 ( 8.5%) 4
|
||||
ast-stats-2 - Expr 96 ( 1.2%) 3
|
||||
ast-stats-2 Param 160 ( 2.0%) 4 40
|
||||
ast-stats-2 FnDecl 200 ( 2.5%) 5 40
|
||||
ast-stats-2 Variant 240 ( 3.0%) 2 120
|
||||
ast-stats-2 GenericBound 288 ( 3.5%) 4 72
|
||||
ast-stats-2 - Trait 288 ( 3.5%) 4
|
||||
ast-stats-2 Block 288 ( 3.5%) 6 48
|
||||
ast-stats-2 AssocItem 416 ( 5.1%) 4 104
|
||||
ast-stats-2 - Type 208 ( 2.6%) 2
|
||||
ast-stats-2 - Fn 208 ( 2.6%) 2
|
||||
ast-stats-2 GenericParam 480 ( 5.9%) 5 96
|
||||
ast-stats-2 Pat 616 ( 7.6%) 7 88
|
||||
ast-stats-2 - Struct 88 ( 1.1%) 1
|
||||
ast-stats-2 - Wild 88 ( 1.1%) 1
|
||||
ast-stats-2 - Ident 440 ( 5.4%) 5
|
||||
ast-stats-2 Expr 648 ( 8.0%) 9 72
|
||||
ast-stats-2 - Path 72 ( 0.9%) 1
|
||||
ast-stats-2 - Match 72 ( 0.9%) 1
|
||||
ast-stats-2 - Struct 72 ( 0.9%) 1
|
||||
ast-stats-2 - InlineAsm 72 ( 0.9%) 1
|
||||
ast-stats-2 - Lit 144 ( 1.8%) 2
|
||||
ast-stats-2 - Block 216 ( 2.7%) 3
|
||||
ast-stats-2 PathSegment 792 ( 9.8%) 33 24
|
||||
ast-stats-2 Ty 896 (11.0%) 14 64
|
||||
ast-stats-2 - Rptr 64 ( 0.8%) 1
|
||||
ast-stats-2 - Ptr 64 ( 0.8%) 1
|
||||
ast-stats-2 - ImplicitSelf 128 ( 1.6%) 2
|
||||
ast-stats-2 - Path 640 ( 7.9%) 10
|
||||
ast-stats-2 Item 2_024 (24.9%) 11 184
|
||||
ast-stats-2 - Trait 184 ( 2.3%) 1
|
||||
ast-stats-2 - Enum 184 ( 2.3%) 1
|
||||
ast-stats-2 - ExternCrate 184 ( 2.3%) 1
|
||||
ast-stats-2 - ForeignMod 184 ( 2.3%) 1
|
||||
ast-stats-2 - Impl 184 ( 2.3%) 1
|
||||
ast-stats-2 - Fn 368 ( 4.5%) 2
|
||||
ast-stats-2 - Use 736 ( 9.1%) 4
|
||||
ast-stats-2 ----------------------------------------------------------------
|
||||
ast-stats-2 Total 8_664
|
||||
ast-stats-2 Total 8_120
|
||||
ast-stats-2
|
||||
hir-stats HIR STATS
|
||||
hir-stats Name Accumulated Size Count Item Size
|
||||
|
Loading…
Reference in New Issue
Block a user