Skip to content

Commit 0354fce

Browse files
committed
---
yaml --- r: 15418 b: refs/heads/try c: a1d5970 h: refs/heads/master v: v3
1 parent 1d0cfed commit 0354fce

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: eb181527b46452925c92350cbb885fdae0756495
5+
refs/heads/try: a1d59704ed12282e7f00c137e03538bc397fc8e3
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rustc/metadata/creader.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ fn read_crates(sess: session::session, crate: ast::crate) {
2828
visit_item: bind visit_item(e, _)
2929
with *visit::default_simple_visitor()});
3030
visit::visit_crate(crate, (), v);
31+
dump_crates(e.crate_cache);
3132
warn_if_multiple_versions(sess, copy e.crate_cache);
3233
}
3334

@@ -38,6 +39,21 @@ type cache_entry = {
3839
metas: @[@ast::meta_item]
3940
};
4041

42+
fn dump_crates(crate_cache: [cache_entry]) {
43+
#debug("resolved crates:");
44+
for crate_cache.each {|entry|
45+
#debug("cnum: %?", entry.cnum);
46+
#debug("span: %?", entry.span);
47+
#debug("hash: %?", entry.hash);
48+
let attrs = [
49+
attr::mk_attr(attr::mk_list_item("link", *entry.metas))
50+
];
51+
for attr::find_linkage_attrs(attrs).each {|attr|
52+
#debug("meta: %s", pprust::attr_to_str(attr));
53+
}
54+
}
55+
}
56+
4157
fn warn_if_multiple_versions(sess: session::session,
4258
crate_cache: [cache_entry]) {
4359
import either::*;
@@ -78,6 +94,7 @@ type env = @{sess: session::session,
7894
fn visit_view_item(e: env, i: @ast::view_item) {
7995
alt i.node {
8096
ast::view_item_use(ident, meta_items, id) {
97+
#debug("resolving use stmt. ident: %?, meta: %?", ident, meta_items);
8198
let cnum = resolve_crate(e, ident, meta_items, "", i.span);
8299
cstore::add_use_stmt_cnum(e.sess.cstore, id, cnum);
83100
}

0 commit comments

Comments
 (0)