]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_middle/src/metadata.rs
Rollup merge of #99711 - tmiasko:coverage, r=wesleywiser
[rust.git] / compiler / rustc_middle / src / metadata.rs
1 use crate::ty;
2
3 use rustc_hir::def::Res;
4 use rustc_macros::HashStable;
5 use rustc_span::symbol::Ident;
6 use rustc_span::Span;
7
8 /// This structure is supposed to keep enough data to re-create `NameBinding`s for other crates
9 /// during name resolution. Right now the bindings are not recreated entirely precisely so we may
10 /// need to add more data in the future to correctly support macros 2.0, for example.
11 /// Module child can be either a proper item or a reexport (including private imports).
12 /// In case of reexport all the fields describe the reexport item itself, not what it refers to.
13 #[derive(Copy, Clone, Debug, TyEncodable, TyDecodable, HashStable)]
14 pub struct ModChild {
15     /// Name of the item.
16     pub ident: Ident,
17     /// Resolution result corresponding to the item.
18     /// Local variables cannot be exported, so this `Res` doesn't need the ID parameter.
19     pub res: Res<!>,
20     /// Visibility of the item.
21     pub vis: ty::Visibility,
22     /// Span of the item.
23     pub span: Span,
24     /// A proper `macro_rules` item (not a reexport).
25     pub macro_rules: bool,
26 }