Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong lifetime of TyCtxt #773

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d8f50ab0ea6c529c24e575279acc72093caeb679
9606f6fa64926a84d82e3c62dbdc57f5c10f756d
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