Skip to content

Instantly share code, notes, and snippets.

@GuillaumeGomez
Created October 20, 2018 18:18
Show Gist options
  • Save GuillaumeGomez/bea82c7f3ceb5a22d3fd96b5d86aa1a5 to your computer and use it in GitHub Desktop.
Save GuillaumeGomez/bea82c7f3ceb5a22d3fd96b5d86aa1a5 to your computer and use it in GitHub Desktop.
Item {
source: Span {
filename: Real("src/lib.rs"),
loline: 1,
locol: 0,
hiline: 2,
hicol: 23
},
name: Some(""),
attrs: Attributes {
doc_strings: [],
other_attrs: [],
cfg: None,
span: None,
links: [],
inner_docs: true
},
inner: ModuleItem(Module {
items: [Item {
source: Span {
filename: Anon,
loline: 0,
locol: 0,
hiline: 0,
hicol: 0
},
name: None,
attrs: Attributes {
doc_strings: [],
other_attrs: [Attribute {
id: AttrId(0),
style: Outer,
path: path(macro_use),
tokens: TokenStream { kind: Empty },
is_sugared_doc: false,
span: src/lib.rs:1:1: 1:1
}],
cfg: None,
span: None,
links: [],
inner_docs: true
},
inner: ExternCrateItem("std", Some("std")),
visibility: Some(Inherited),
def_id: DefId(1/0:0 ~ std[bb52]),
stability: None,
deprecation: None
},
Item {
source: Span {
filename: Real("src/lib.rs"),
loline: 2,
locol: 0,
hiline: 2,
hicol: 23
},
name: None,
attrs: Attributes {
doc_strings: [],
other_attrs: [],
cfg: None,
span: None,
links: [],
inner_docs: true
},
inner: ExternCrateItem("c_vec", None),
visibility: Some(Public),
def_id: DefId(10/0:0 ~ c_vec[e418]),
stability: None,
deprecation: None
},
Item {
source: Span {
filename: Anon,
loline: 0,
locol: 0,
hiline: 0,
hicol: 0
},
name: None,
attrs: Attributes {
doc_strings: [],
other_attrs: [Attribute {
id: AttrId(1),
style: Outer,
path: path(prelude_import),
tokens: TokenStream { kind: Empty },
is_sugared_doc: false,
span: src/lib.rs:1:1: 1:1
}],
cfg: None,
span: None,
links: [],
inner_docs: true
},
inner: ImportItem(Glob(ImportSource {
path: Path {
global: true,
def: Err,
segments: [PathSegment {
name: "std",
args: AngleBracketed { lifetimes: [], types: [], bindings: [] } },
PathSegment { name: "prelude", args: AngleBracketed { lifetimes: [], types: [], bindings: [] } },
PathSegment { name: "v1", args: AngleBracketed { lifetimes: [], types: [], bindings: [] } }] },
did: None
})),
visibility: Some(Inherited),
def_id: DefId(0/0:0 ~ foo[8787]),
stability: None,
deprecation: None
},
Item {
source: Span {
filename: Real("/Users/imperio/.cargo/registry/src/github.com-1ecc6299db9ec823/macro-utils-0.1.2/src/lib.rs"),
loline: 23,
locol: 0,
hiline: 61,
hicol: 16
},
name: Some("macro_utils"),
attrs: Attributes {
doc_strings: [SugaredDoc(0, /Users/imperio/.cargo/registry/src/github.com-1ecc6299db9ec823/macro-utils-0.1.2/src/lib.rs:23:1: 23:34, " Some useful and funny macros.")],
other_attrs: [Attribute {
id: AttrId(47),
style: Outer,
path: path(macro_export),
tokens: TokenStream {kind: Empty },
is_sugared_doc: false,
span: /Users/imperio/.cargo/registry/src/github.com-1ecc6299db9ec823/macro-utils-0.1.2/src/tern_python.rs:54:1: 54:16
}],
cfg: None,
span: Some(/Users/imperio/.cargo/registry/src/github.com-1ecc6299db9ec823/macro-utils-0.1.2/src/tern_python.rs:43:1: 43:51),
links: [],
inner_docs: false
}],
other_attrs: [Attribute {
id: AttrId(134),
style: Outer,
path: path(macro_export),
tokens: TokenStream { kind: Empty },
is_sugared_doc: false,
span: /Users/imperio/.cargo/registry/src/github.com-1ecc6299db9ec823/macro-utils-0.1.2/src/if_match.rs:79:1: 79:16
}],
cfg: None,
span: Some(/Users/imperio/.cargo/registry/src/github.com-1ecc6299db9ec823/macro-utils-0.1.2/src/if_match.rs:23:1: 23:59),
links: [],
inner_docs: false
},
inner: MacroItem(Macro {
source: "macro_rules! if_match {\n ( $ ( let $ expr : pat = ) * $ cond : expr => $ then : expr $ ( , ) * ) => { ... };\n (\n$ ( let $ expr : pat = ) * $ cond : expr => $ then : expr , else => $ elsethen\n: expr $ ( , ) * ) => { ... };\n (\n$ ( let $ expr : pat = ) * $ cond : expr => $ then : expr , $ (\n$ ( let $ expr2 : pat = ) * $ else_cond : expr => $ else_then : expr , ) *\nelse => $ else_expr : expr $ ( , ) * ) => { ... };\n (\n$ ( let $ expr : pat = ) * $ cond : expr => $ then : expr , $ (\n$ ( let $ expr2 : pat = ) * $ more : expr => $ more_then : expr $ ( , ) * ) *\n) => { ... };\n ( ) => { ... };\n}",
imported_from: Some("macro_utils")
}),
visibility: Some(Public),
def_id: DefId(11/0:4 ~ macro_utils[3e17]::if_match[0]::if_match[0]),
stability: None,
deprecation: None
}],
is_crate: false
}),
visibility: Some(Public),
def_id: DefId(11/0:0 ~ macro_utils[3e17]),
stability: None,
deprecation: None
}],
is_crate: true
}),
visibility: Some(Public),
def_id: DefId(0/0:0 ~ foo[8787]),
stability: None,
deprecation: None }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment