Remove the last traces of the distinction between export / local meta items
Issue #487
This commit is contained in:
parent
dfcfef41df
commit
82a74fcb3f
3 changed files with 0 additions and 30 deletions
|
|
@ -316,11 +316,6 @@ fn list_meta_items(&ebml::doc meta_items, io::writer out) {
|
|||
fn list_crate_attributes(&ebml::doc md, io::writer out) {
|
||||
out.write_str("=Crate=");
|
||||
|
||||
// FIXME (#487): This is transitional until attributes are snapshotted
|
||||
out.write_str("old-style:\n");
|
||||
auto meta_items = ebml::get_doc(md, tag_meta_export);
|
||||
list_meta_items(meta_items, out);
|
||||
|
||||
for (ast::attribute attr in get_attributes(md)) {
|
||||
out.write_str(#fmt("%s", pprust::attribute_to_str(attr)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -457,32 +457,11 @@ fn encode_attributes(&ebml::writer ebml_w, &vec[attribute] attrs) {
|
|||
ebml::end_tag(ebml_w);
|
||||
}
|
||||
|
||||
// FIXME (#487): Transitional
|
||||
fn encode_meta_items(&ebml::writer ebml_w, &crate crate) {
|
||||
auto name = middle::attr::find_attrs_by_name(crate.node.attrs,
|
||||
"name");
|
||||
auto value = middle::attr::find_attrs_by_name(crate.node.attrs,
|
||||
"value");
|
||||
auto name_and_val = middle::attr::attr_metas(name + value);
|
||||
|
||||
ebml::start_tag(ebml_w, tag_meta_export);
|
||||
for (@meta_item mi in name_and_val) {
|
||||
encode_meta_item(ebml_w, *mi);
|
||||
}
|
||||
ebml::end_tag(ebml_w);
|
||||
ebml::start_tag(ebml_w, tag_meta_local);
|
||||
ebml::end_tag(ebml_w);
|
||||
}
|
||||
|
||||
fn encode_metadata(&@crate_ctxt cx, &@crate crate) -> str {
|
||||
auto string_w = io::string_writer();
|
||||
auto buf_w = string_w.get_writer().get_buf_writer();
|
||||
auto ebml_w = ebml::create_writer(buf_w);
|
||||
|
||||
// FIXME: This is the old way of encoding crate meta items
|
||||
// Remove after going through a snapshot cycle
|
||||
encode_meta_items(ebml_w, *crate);
|
||||
// Encode crate attributes
|
||||
encode_attributes(ebml_w, crate.node.attrs);
|
||||
// Encode and index the paths.
|
||||
|
||||
|
|
|
|||
|
|
@ -40,10 +40,6 @@ const uint tag_index_buckets_bucket_elt = 0x14u;
|
|||
|
||||
const uint tag_index_table = 0x15u;
|
||||
|
||||
const uint tag_meta_export = 0x16u;
|
||||
|
||||
const uint tag_meta_local = 0x17u;
|
||||
|
||||
const uint tag_meta_item_name_value = 0x18u;
|
||||
|
||||
const uint tag_meta_item_name = 0x19u;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue