<commit_before>import driver::session;
import syntax::ast;
import middle::ty;
import std::io;

fn get_symbol(session::session sess, ast::def_id def) -> str {
    auto cnum = def._0;
    auto node_id = def._1;
    auto cstore = sess.get_cstore();
    auto cdata = cstore::get_crate_data(cstore, cnum).data;
    ret decoder::get_symbol(cdata, node_id);
}

fn get_tag_variants(ty::ctxt tcx, ast::def_id def) -> ty::variant_info[] {
    decoder::get_tag_variants(tcx, def)
}

fn get_type(ty::ctxt tcx, ast::def_id def) -> ty::ty_param_count_and_ty {
    decoder::get_type(tcx, def)
}

fn get_type_param_count(ty::ctxt tcx, &ast::def_id def) -> uint {
    auto cnum = def._0;
    auto node_id = def._1;
    auto cstore = tcx.sess.get_cstore();
    auto cdata = cstore::get_crate_data(cstore, cnum).data;
    ret decoder::get_type_param_count(cdata, node_id);
}

fn lookup_defs(session::session sess, ast::crate_num cnum,
               vec[ast::ident] path) -> vec[ast::def] {
    auto cstore = sess.get_cstore();
    auto cdata = cstore::get_crate_data(cstore, cnum).data;
    ret decoder::lookup_defs(cdata, cnum, path);
}

fn get_crate_attributes(&vec[u8] data) -> ast::attribute[] {
    decoder::get_crate_attributes(data)
}

fn list_crate_metadata(vec[u8] data, io::writer out) {
    decoder::list_crate_metadata(data, out)
}


// Local Variables:
// mode: rust
// fill-column: 78;
// indent-tabs-mode: nil
// c-basic-offset: 4
// buffer-file-coding-system: utf-8-unix
// compile-command: "make -k -C $RBUILD 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
// End:<commit_msg>Remove unused functions from metadata::csearch<commit_after>import driver::session;
import syntax::ast;
import middle::ty;
import std::io;

fn get_symbol(session::session sess, ast::def_id def) -> str {
    auto cnum = def._0;
    auto node_id = def._1;
    auto cstore = sess.get_cstore();
    auto cdata = cstore::get_crate_data(cstore, cnum).data;
    ret decoder::get_symbol(cdata, node_id);
}

fn get_tag_variants(ty::ctxt tcx, ast::def_id def) -> ty::variant_info[] {
    decoder::get_tag_variants(tcx, def)
}

fn get_type(ty::ctxt tcx, ast::def_id def) -> ty::ty_param_count_and_ty {
    decoder::get_type(tcx, def)
}

fn get_type_param_count(ty::ctxt tcx, &ast::def_id def) -> uint {
    auto cnum = def._0;
    auto node_id = def._1;
    auto cstore = tcx.sess.get_cstore();
    auto cdata = cstore::get_crate_data(cstore, cnum).data;
    ret decoder::get_type_param_count(cdata, node_id);
}

fn lookup_defs(session::session sess, ast::crate_num cnum,
               vec[ast::ident] path) -> vec[ast::def] {
    auto cstore = sess.get_cstore();
    auto cdata = cstore::get_crate_data(cstore, cnum).data;
    ret decoder::lookup_defs(cdata, cnum, path);
}

// Local Variables:
// mode: rust
// fill-column: 78;
// indent-tabs-mode: nil
// c-basic-offset: 4
// buffer-file-coding-system: utf-8-unix
// compile-command: "make -k -C $RBUILD 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
// End:
{'fraction_non_alphanumeric': 0.16553825321597834, 'fraction_numerical': 0.007447528774542992, 'mean_word_length': 3.958053691275168, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2985890', 'n_tokens_mistral': 1161, 'n_tokens_neox': 1149, 'n_words': 233}