rustc: Remove metadata from the session.
This mechanism was not being used for anything. Issue #487.
This commit is contained in:
parent
374967f67e
commit
81a187e8be
@ -270,9 +270,8 @@ fn build_session(@session::options sopts) -> session::session {
|
||||
auto target_cfg = build_target_config();
|
||||
auto crate_cache = common::new_int_hash[session::crate_metadata]();
|
||||
auto target_crate_num = 0;
|
||||
let vec[@ast::meta_item] md = [];
|
||||
auto sess =
|
||||
session::session(target_crate_num, target_cfg, sopts, crate_cache, md,
|
||||
session::session(target_crate_num, target_cfg, sopts, crate_cache,
|
||||
front::codemap::new_codemap());
|
||||
ret sess;
|
||||
}
|
||||
|
@ -66,7 +66,6 @@ obj session(ast::crate_num cnum,
|
||||
@config targ_cfg,
|
||||
@options opts,
|
||||
map::hashmap[int, crate_metadata] crates,
|
||||
mutable vec[@ast::meta_item] metadata,
|
||||
codemap::codemap cm) {
|
||||
fn get_targ_cfg() -> @config { ret targ_cfg; }
|
||||
fn get_opts() -> @options { ret opts; }
|
||||
@ -81,8 +80,6 @@ obj session(ast::crate_num cnum,
|
||||
emit_diagnostic(none[span], msg, "error", 9u8, cm);
|
||||
fail;
|
||||
}
|
||||
fn add_metadata(vec[@ast::meta_item] data) { metadata = metadata + data; }
|
||||
fn get_metadata() -> vec[@ast::meta_item] { ret metadata; }
|
||||
fn span_warn(span sp, str msg) {
|
||||
// FIXME: Use constants, but rustboot doesn't know how to export them.
|
||||
|
||||
|
@ -316,9 +316,7 @@ fn eval_crate_directive(ctx cx, env e, @ast::crate_directive cdir, str prefix,
|
||||
case (ast::cdir_view_item(?vi)) {
|
||||
vec::push[@ast::view_item](view_items, vi);
|
||||
}
|
||||
case (ast::cdir_meta(?vi, ?mi)) {
|
||||
if (vi == ast::export_meta) { cx.sess.add_metadata(mi); }
|
||||
}
|
||||
case (ast::cdir_meta(?vi, ?mi)) { }
|
||||
case (ast::cdir_syntax(?pth)) { }
|
||||
case (ast::cdir_auth(?pth, ?eff)) { }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user