Skip to content
/ miri Public
forked from rust-lang/miri

Commit

Permalink
Fix wrong lifetime of TyCtxt
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Jun 14, 2019
1 parent 4736692 commit d69c02e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/bin/miri-rustc-tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
compiler.session().abort_if_errors();
compiler.global_ctxt().unwrap().peek_mut().enter(|tcx| {
if std::env::args().any(|arg| arg == "--test") {
struct Visitor<'tcx>(TyCtxt<'tcx, 'tcx>);
struct Visitor<'tcx>(TyCtxt<'tcx>);
impl<'tcx, 'hir> itemlikevisit::ItemLikeVisitor<'hir> for Visitor<'tcx> {
fn visit_item(&mut self, i: &'hir hir::Item) {
if let hir::ItemKind::Fn(.., body_id) = i.node {
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub struct MiriConfig {

// Used by priroda.
pub fn create_ecx<'mir, 'tcx: 'mir>(
tcx: TyCtxt<'tcx, 'tcx>,
tcx: TyCtxt<'tcx>,
main_id: DefId,
config: MiriConfig,
) -> InterpResult<'tcx, InterpretCx<'mir, 'tcx, Evaluator<'tcx>>> {
Expand Down Expand Up @@ -212,7 +212,7 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
}

pub fn eval_main<'tcx>(
tcx: TyCtxt<'tcx, 'tcx>,
tcx: TyCtxt<'tcx>,
main_id: DefId,
config: MiriConfig,
) {
Expand Down Expand Up @@ -475,7 +475,7 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for Evaluator<'tcx> {

fn find_foreign_static(
def_id: DefId,
tcx: TyCtxtAt<'tcx, 'tcx>,
tcx: TyCtxtAt<'tcx>,
) -> InterpResult<'tcx, Cow<'tcx, Allocation>> {
let attrs = tcx.get_attrs(def_id);
let link_name = match attr::first_attr_value_str_by_name(&attrs, sym::link_name) {
Expand Down

0 comments on commit d69c02e

Please sign in to comment.