提交 ab98f163 编写于 作者: B Brian Anderson

rustc: Downcase metadata::Encode

上级 8746b84e
......@@ -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
......
......@@ -80,7 +80,7 @@
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);
}
......
......@@ -133,7 +133,7 @@ fn mt_to_str(&ctxt cx, &mt m) -> 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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册