rustc: Downcase metadata::Encode

This commit is contained in:
Brian Anderson 2011-06-22 18:09:15 -07:00
parent 8746b84eec
commit ab98f16373
3 changed files with 4 additions and 4 deletions

View File

@ -406,7 +406,7 @@ fn symbol_hash(ty::ctxt tcx, sha1 sha, &ty::t t, str crate_meta_name,
sha.input_str("-");
sha.input_str(crate_meta_name);
sha.input_str("-");
sha.input_str(metadata::Encode::ty_str(cx, t));
sha.input_str(metadata::encode::ty_str(cx, t));
auto hash = truncated_sha1_result(sha);
// Prefix with _ so that it never blends into adjacent digits

View File

@ -80,7 +80,7 @@ type ty_abbrev = rec(uint pos, uint len, str s);
tag abbrev_ctxt { ac_no_abbrevs; ac_use_abbrevs(hashmap[ty::t, ty_abbrev]); }
mod Encode {
mod encode {
type ctxt =
rec(fn(&def_id) -> str ds, // Def -> str Callback:
@ -454,7 +454,7 @@ fn encode_type(&@trans::crate_ctxt cx, &ebml::writer ebml_w, &ty::t typ) {
auto f = def_to_str;
auto ty_str_ctxt =
@rec(ds=f, tcx=cx.tcx, abbrevs=ac_use_abbrevs(cx.type_abbrevs));
Encode::enc_ty(io::new_writer_(ebml_w.writer), ty_str_ctxt, typ);
encode::enc_ty(io::new_writer_(ebml_w.writer), ty_str_ctxt, typ);
ebml::end_tag(ebml_w);
}

View File

@ -133,7 +133,7 @@ fn ty_to_str(&ctxt cx, &t typ) -> str {
fn ty_to_short_str(&ctxt cx, t typ) -> str {
auto f = def_to_str;
auto ecx = @rec(ds=f, tcx=cx, abbrevs=middle::metadata::ac_no_abbrevs);
auto s = middle::metadata::Encode::ty_str(ecx, typ);
auto s = middle::metadata::encode::ty_str(ecx, typ);
if (str::byte_len(s) >= 32u) { s = str::substr(s, 0u, 32u); }
ret s;
}