From fd0dccd4b12169e0aac42aff8addbb26b6d72197 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Sat, 15 Jun 2019 02:34:11 +0700 Subject: [PATCH 1/2] Fix wrong lifetime of TyCtxt Rustup rust-lang/rust#61817 --- rust-version | 2 +- src/bin/miri-rustc-tests.rs | 2 +- src/lib.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rust-version b/rust-version index b945d0b3a26..e60eb6c9495 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -d8f50ab0ea6c529c24e575279acc72093caeb679 +9606f6fa64926a84d82e3c62dbdc57f5c10f756d diff --git a/src/bin/miri-rustc-tests.rs b/src/bin/miri-rustc-tests.rs index e8714123ceb..9b0d02f4b7e 100644 --- a/src/bin/miri-rustc-tests.rs +++ b/src/bin/miri-rustc-tests.rs @@ -43,7 +43,7 @@ fn after_analysis(&mut self, compiler: &interface::Compiler) -> bool { 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 { diff --git a/src/lib.rs b/src/lib.rs index 822b173e34a..061b07478a2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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>>> { @@ -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, ) { @@ -475,7 +475,7 @@ fn box_alloc( 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) { From d210ed7e122632b0904f8c077b94459fda92012f Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 16 Jun 2019 09:49:27 +0200 Subject: [PATCH 2/2] bump rustc yet again --- rust-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-version b/rust-version index e60eb6c9495..9d2a8772234 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -9606f6fa64926a84d82e3c62dbdc57f5c10f756d +374c63e0fc356eb61b1966cb6026a2a49fe9226d