Skip to content

Instantly share code, notes, and snippets.

@nikomatsakis
Created November 2, 2017 12:50
Show Gist options
  • Save nikomatsakis/547d9616aeae6c87d947395a6b3af525 to your computer and use it in GitHub Desktop.
Save nikomatsakis/547d9616aeae6c87d947395a6b3af525 to your computer and use it in GitHub Desktop.
Crate {
module: Mod {
inner: Span {
lo: BytePos(
0
),
hi: BytePos(
17
),
ctxt: #0
},
item_ids: [
ItemId {
id: NodeId(
2
)
},
ItemId {
id: NodeId(
3
)
},
ItemId {
id: NodeId(
4
)
}
]
},
attrs: [],
span: Span {
lo: BytePos(
0
),
hi: BytePos(
17
),
ctxt: #0
},
exported_macros: [],
items: {
NodeId(
2
): Item {
name: (0),
id: NodeId(
2
),
hir_id: HirId {
owner: DefIndex(0:1),
local_id: ItemLocalId(
0
)
},
attrs: [
Attribute {
id: AttrId(
1
),
style: Outer,
path: path(prelude_import),
tokens: TokenStream {
kind: Empty
},
is_sugared_doc: false,
span: Span {
lo: BytePos(
0
),
hi: BytePos(
0
),
ctxt: #1
}
}
],
node: ItemUse(
path(std::prelude::v1),
Glob
),
vis: Inherited,
span: Span {
lo: BytePos(
0
),
hi: BytePos(
0
),
ctxt: #1
}
},
NodeId(
3
): Item {
name: std(87),
id: NodeId(
3
),
hir_id: HirId {
owner: DefIndex(0:2),
local_id: ItemLocalId(
0
)
},
attrs: [
Attribute {
id: AttrId(
0
),
style: Outer,
path: path(macro_use),
tokens: TokenStream {
kind: Empty
},
is_sugared_doc: false,
span: Span {
lo: BytePos(
0
),
hi: BytePos(
0
),
ctxt: #0
}
}
],
node: ItemExternCrate(
Some(
std(87)
)
),
vis: Inherited,
span: Span {
lo: BytePos(
0
),
hi: BytePos(
0
),
ctxt: #0
}
},
NodeId(
4
): Item {
name: bar(86),
id: NodeId(
4
),
hir_id: HirId {
owner: DefIndex(0:3),
local_id: ItemLocalId(
0
)
},
attrs: [],
node: ItemFn(
FnDecl {
inputs: [],
output: DefaultReturn(
Span {
lo: BytePos(
9
),
hi: BytePos(
9
),
ctxt: #0
}
),
variadic: false,
has_implicit_self: false
},
Normal,
NotConst,
Rust,
Generics {
lifetimes: [],
ty_params: [],
where_clause: WhereClause {
id: NodeId(
5
),
predicates: []
},
span: Span {
lo: BytePos(
0
),
hi: BytePos(
0
),
ctxt: #0
}
},
BodyId {
node_id: NodeId(
7
)
}
),
vis: Inherited,
span: Span {
lo: BytePos(
0
),
hi: BytePos(
17
),
ctxt: #0
}
}
},
trait_items: {},
impl_items: {},
bodies: {
BodyId {
node_id: NodeId(
7
)
}: Body {
arguments: [],
value: expr(7: { }),
is_generator: false
}
},
trait_impls: {},
trait_default_impl: {},
body_ids: [
BodyId {
node_id: NodeId(
7
)
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment