diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-05-23 19:32:00 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-05-25 01:18:11 -0700 |
| commit | 316ef79dc2726a688373f86c5201d14db32684d9 (patch) | |
| tree | a1fc59b587dfff8c4648ab49483ce7965aedb795 | |
| parent | 781e898348496d5d290ef0d181ce0a68f606c128 (diff) | |
| download | rust-316ef79dc2726a688373f86c5201d14db32684d9.tar.gz rust-316ef79dc2726a688373f86c5201d14db32684d9.zip | |
rustc: Encode module attributes
This will allow for rustdoc to pick up the documentation on the other end.
| -rw-r--r-- | src/librustc/metadata/encoder.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/librustc/metadata/encoder.rs b/src/librustc/metadata/encoder.rs index b12de2aee09..443a8acfb0c 100644 --- a/src/librustc/metadata/encoder.rs +++ b/src/librustc/metadata/encoder.rs @@ -536,6 +536,7 @@ fn encode_reexports(ecx: &EncodeContext, fn encode_info_for_mod(ecx: &EncodeContext, ebml_w: &mut Encoder, md: &Mod, + attrs: &[Attribute], id: NodeId, path: PathElems, name: Ident, @@ -584,6 +585,7 @@ fn encode_info_for_mod(ecx: &EncodeContext, debug!("(encoding info for module) encoding reexports for {}", id); encode_reexports(ecx, ebml_w, id, path); } + encode_attributes(ebml_w, attrs); ebml_w.end_tag(); } @@ -938,6 +940,7 @@ fn encode_info_for_item(ecx: &EncodeContext, encode_info_for_mod(ecx, ebml_w, m, + item.attrs.as_slice(), item.id, path, item.ident, @@ -1337,6 +1340,7 @@ fn encode_info_for_items(ecx: &EncodeContext, encode_info_for_mod(ecx, ebml_w, &krate.module, + &[], CRATE_NODE_ID, ast_map::Values([].iter()).chain(None), syntax::parse::token::special_idents::invalid, |
