Skip to content

Commit 23d6e11

Browse files
committed
---
yaml --- r: 125957 b: refs/heads/try c: 8876ce4 h: refs/heads/master i: 125955: 05fb81c v: v3
1 parent ebe02e7 commit 23d6e11

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: f2fa55903e378368ed9173560f03a0ef16e371c2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 9fc8394d3bce22ab483f98842434c84c396212ae
5-
refs/heads/try: fc08779185e92e456be2e72170f25587d35350f8
5+
refs/heads/try: 8876ce44c59bbb20006ae5beccc9f6954e7d1e4f
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/metadata/common.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,3 +231,5 @@ pub static tag_unboxed_closure_type: uint = 0x97;
231231
pub static tag_struct_fields: uint = 0x98;
232232
pub static tag_struct_field: uint = 0x99;
233233
pub static tag_struct_field_id: uint = 0x9a;
234+
235+
pub static tag_attribute_is_sugared_doc: uint = 0x9b;

branches/try/src/librustc/metadata/decoder.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,9 @@ fn get_attributes(md: ebml::Doc) -> Vec<ast::Attribute> {
10561056
match reader::maybe_get_doc(md, tag_attributes) {
10571057
Some(attrs_d) => {
10581058
reader::tagged_docs(attrs_d, tag_attribute, |attr_doc| {
1059+
let is_sugared_doc = reader::doc_as_u8(
1060+
reader::get_doc(attr_doc, tag_attribute_is_sugared_doc)
1061+
) == 1;
10591062
let meta_items = get_meta_items(attr_doc);
10601063
// Currently it's only possible to have a single meta item on
10611064
// an attribute
@@ -1067,7 +1070,7 @@ fn get_attributes(md: ebml::Doc) -> Vec<ast::Attribute> {
10671070
id: attr::mk_attr_id(),
10681071
style: ast::AttrOuter,
10691072
value: meta_item,
1070-
is_sugared_doc: false,
1073+
is_sugared_doc: is_sugared_doc,
10711074
},
10721075
span: codemap::DUMMY_SP
10731076
});

branches/try/src/librustc/metadata/encoder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,6 +1490,7 @@ fn encode_attributes(ebml_w: &mut Encoder, attrs: &[Attribute]) {
14901490
ebml_w.start_tag(tag_attributes);
14911491
for attr in attrs.iter() {
14921492
ebml_w.start_tag(tag_attribute);
1493+
ebml_w.wr_tagged_u8(tag_attribute_is_sugared_doc, attr.node.is_sugared_doc as u8);
14931494
encode_meta_item(ebml_w, attr.node.value);
14941495
ebml_w.end_tag();
14951496
}

0 commit comments

Comments
 (0)