diff --git a/Cargo.lock b/Cargo.lock index 99bc37a9..1343ac1c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -157,9 +157,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.1" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907d8581360765417f8f2e0e7d602733bbed60156b4465b7617243689ef9b83d" +checksum = "324c74f2155653c90b04f25b2a47a8a631360cb908f92a772695f430c7e31052" [[package]] name = "cexpr" diff --git a/binaries/summary_store.tar b/binaries/summary_store.tar index b36ea95a..0d78edea 100644 Binary files a/binaries/summary_store.tar and b/binaries/summary_store.tar differ diff --git a/checker/src/block_visitor.rs b/checker/src/block_visitor.rs index 9fd0e9ff..f564fa87 100644 --- a/checker/src/block_visitor.rs +++ b/checker/src/block_visitor.rs @@ -2954,7 +2954,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com // The size is always the pointer size of the current target, but this is not information // that we always have readily available. ConstValue::Scalar(Scalar::Ptr(ptr, _size)) => { - match self.bv.tcx.try_get_global_alloc(ptr.provenance) { + match self.bv.tcx.try_get_global_alloc(ptr.provenance.alloc_id()) { Some(GlobalAlloc::Memory(alloc)) => { let alloc_len = alloc.inner().len() as u64; let offset_bytes = ptr.into_parts().1.bytes(); diff --git a/checker/src/crate_visitor.rs b/checker/src/crate_visitor.rs index bd1230c7..5bda76a1 100644 --- a/checker/src/crate_visitor.rs +++ b/checker/src/crate_visitor.rs @@ -243,7 +243,7 @@ impl<'compilation, 'tcx> CrateVisitor<'compilation, 'tcx> { /// Emit any diagnostics or, if testing, check that they are as expected. #[logfn_inputs(TRACE)] fn emit_or_check_diagnostics(&mut self) { - self.session.diagnostic().reset_err_count(); + self.session.dcx().reset_err_count(); if self.options.statistics { let num_diags = self.diagnostics_for.values().flatten().count(); for (_, diags) in self.diagnostics_for.drain() { diff --git a/checker/src/main.rs b/checker/src/main.rs index dda7dac0..12a332b6 100644 --- a/checker/src/main.rs +++ b/checker/src/main.rs @@ -31,7 +31,7 @@ use std::path::Path; fn main() { let early_error_handler = - rustc_session::EarlyErrorHandler::new(rustc_session::config::ErrorOutputType::default()); + rustc_session::EarlyDiagCtxt::new(rustc_session::config::ErrorOutputType::default()); // Initialize loggers. if env::var("RUSTC_LOG").is_ok() { diff --git a/checker/src/options.rs b/checker/src/options.rs index c6894425..b8640637 100644 --- a/checker/src/options.rs +++ b/checker/src/options.rs @@ -9,7 +9,7 @@ use clap::{Arg, Command}; use itertools::Itertools; use mirai_annotations::*; -use rustc_session::EarlyErrorHandler; +use rustc_session::EarlyDiagCtxt; /// Creates the clap::Command metadata for argument parsing. fn make_options_parser(running_test_harness: bool) -> Command { @@ -110,7 +110,7 @@ impl Options { pub fn parse_from_str( &mut self, s: &str, - handler: &EarlyErrorHandler, + handler: &EarlyDiagCtxt, running_test_harness: bool, ) -> Vec { self.parse( @@ -127,7 +127,7 @@ impl Options { pub fn parse( &mut self, args: &[String], - handler: &EarlyErrorHandler, + handler: &EarlyDiagCtxt, running_test_harness: bool, ) -> Vec { let mut mirai_args_end = args.len(); diff --git a/checker/src/utils.rs b/checker/src/utils.rs index 69b3a428..0b509344 100644 --- a/checker/src/utils.rs +++ b/checker/src/utils.rs @@ -94,11 +94,16 @@ pub fn is_public(def_id: DefId, tcx: TyCtxt<'_>) -> bool { if tcx.hir().get_if_local(def_id).is_some() { let def_id = def_id.expect_local(); - match tcx.resolutions(()).visibilities.get(&def_id) { - Some(vis) => vis.is_public(), + match tcx + .resolutions(()) + .visibilities_for_hashing + .iter() + .find(|(id, _)| *id == def_id) + { + Some((_, vis)) => vis.is_public(), None => { let hir_id = tcx.local_def_id_to_hir_id(def_id); - match tcx.hir().get(hir_id) { + match tcx.hir_node(hir_id) { Node::Expr(rustc_hir::Expr { kind: rustc_hir::ExprKind::Closure { .. }, .. @@ -112,7 +117,7 @@ pub fn is_public(def_id: DefId, tcx: TyCtxt<'_>) -> bool { .is_public(), Node::ImplItem(..) => { let parent_def_id: LocalDefId = tcx.hir().get_parent_item(hir_id).def_id; - match tcx.hir().get_by_def_id(parent_def_id) { + match tcx.hir_node_by_def_id(parent_def_id) { Node::Item(rustc_hir::Item { kind: rustc_hir::ItemKind::Impl(rustc_hir::Impl { diff --git a/checker/tests/call_graph/fnptr.rs b/checker/tests/call_graph/fnptr.rs index 2b4778ef..3669eb61 100644 --- a/checker/tests/call_graph/fnptr.rs +++ b/checker/tests/call_graph/fnptr.rs @@ -69,7 +69,7 @@ commit; ], "callables": [ { - "name": "/fnptr/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr[26f3]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr[a4a0]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 9, "local": true diff --git a/checker/tests/call_graph/fnptr_clean.rs b/checker/tests/call_graph/fnptr_clean.rs index 7c572298..21437a49 100644 --- a/checker/tests/call_graph/fnptr_clean.rs +++ b/checker/tests/call_graph/fnptr_clean.rs @@ -74,7 +74,7 @@ commit; ], "callables": [ { - "name": "/fnptr_clean/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_clean[599c]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_clean/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_clean[5a5f]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 14, "local": true diff --git a/checker/tests/call_graph/fnptr_deduplicate.rs b/checker/tests/call_graph/fnptr_deduplicate.rs index fe52121c..3f4bd64c 100644 --- a/checker/tests/call_graph/fnptr_deduplicate.rs +++ b/checker/tests/call_graph/fnptr_deduplicate.rs @@ -66,7 +66,7 @@ commit; ], "callables": [ { - "name": "/fnptr_deduplicate/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_deduplicate[2d10]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_deduplicate/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_deduplicate[09c2]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 10, "local": true diff --git a/checker/tests/call_graph/fnptr_dom.rs b/checker/tests/call_graph/fnptr_dom.rs index eecd2a8e..4ac1ee22 100644 --- a/checker/tests/call_graph/fnptr_dom.rs +++ b/checker/tests/call_graph/fnptr_dom.rs @@ -71,7 +71,7 @@ commit; ], "callables": [ { - "name": "/fnptr_dom/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_dom[7782]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:8 ~ fnptr_dom[7782]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_dom/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_dom[50c6]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:8 ~ fnptr_dom[50c6]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 9, "local": true diff --git a/checker/tests/call_graph/fnptr_dom_loop.rs b/checker/tests/call_graph/fnptr_dom_loop.rs index b4ceb952..47f482c7 100644 --- a/checker/tests/call_graph/fnptr_dom_loop.rs +++ b/checker/tests/call_graph/fnptr_dom_loop.rs @@ -85,7 +85,7 @@ commit; ], "callables": [ { - "name": "/fnptr_dom_loop/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_dom_loop[cf26]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:9 ~ fnptr_dom_loop[cf26]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_dom_loop/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_dom_loop[cf4c]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:9 ~ fnptr_dom_loop[cf4c]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 9, "local": true diff --git a/checker/tests/call_graph/fnptr_dom_loop_souffle.rs b/checker/tests/call_graph/fnptr_dom_loop_souffle.rs index bba9bd3e..a63566a1 100644 --- a/checker/tests/call_graph/fnptr_dom_loop_souffle.rs +++ b/checker/tests/call_graph/fnptr_dom_loop_souffle.rs @@ -82,7 +82,7 @@ digraph { ], "callables": [ { - "name": "/fnptr_dom_loop_souffle/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_dom_loop_souffle[ce91]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:9 ~ fnptr_dom_loop_souffle[ce91]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_dom_loop_souffle/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_dom_loop_souffle[2d0f]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:9 ~ fnptr_dom_loop_souffle[2d0f]::fn1::'_#1), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 10, "local": true diff --git a/checker/tests/call_graph/fnptr_fold.rs b/checker/tests/call_graph/fnptr_fold.rs index 1b0f2623..9c513191 100644 --- a/checker/tests/call_graph/fnptr_fold.rs +++ b/checker/tests/call_graph/fnptr_fold.rs @@ -68,14 +68,14 @@ commit; /* EXPECTED:CALL_SITES{ "files": [ "tests/call_graph/fnptr_fold.rs", - "/rustc/1fdfe1234795a289af1088aefa92ef80191cb611/library/std/src/io/stdio.rs", - "/rustc/1fdfe1234795a289af1088aefa92ef80191cb611/library/core/src/fmt/mod.rs", - "/rustc/1fdfe1234795a289af1088aefa92ef80191cb611/library/core/src/slice/mod.rs", - "/rustc/1fdfe1234795a289af1088aefa92ef80191cb611/library/core/src/ptr/metadata.rs" + "/rustc/5ac4c8a63ee305742071ac6dd11817f7c24adce2/library/std/src/io/stdio.rs", + "/rustc/5ac4c8a63ee305742071ac6dd11817f7c24adce2/library/core/src/fmt/mod.rs", + "/rustc/5ac4c8a63ee305742071ac6dd11817f7c24adce2/library/core/src/slice/mod.rs", + "/rustc/5ac4c8a63ee305742071ac6dd11817f7c24adce2/library/core/src/ptr/metadata.rs" ], "callables": [ { - "name": "/fnptr_fold/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_fold[8908]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_fold/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_fold[6cc8]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 10, "local": true @@ -99,25 +99,25 @@ commit; "local": true }, { - "name": "/std/std::io::_print(std::fmt::Arguments)->()", + "name": "/std/std::io::_print(std::fmt::Arguments)->()", "file_index": 1, "first_line": 1096, "local": false }, { - "name": "/core/std::fmt::Arguments::<'a>::new_const(&ReEarlyParam(DefId(2:9827 ~ core[408d]::fmt::{impl#2}::'a), 0, 'a) [&ReStatic str])->std::fmt::Arguments", + "name": "/core/std::fmt::Arguments::<'a>::new_const(&ReEarlyParam(DefId(2:9923 ~ core[58e1]::fmt::{impl#2}::'a), 0, 'a) [&ReStatic str])->std::fmt::Arguments", "file_index": 2, "first_line": 321, "local": true }, { - "name": "/core/core::slice::::len(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(2:59746 ~ core[408d]::slice::{impl#0}::len::'_), '_) }) [T/#0])->usize", + "name": "/core/core::slice::::len(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(2:59803 ~ core[58e1]::slice::{impl#0}::len::'_), '_) }) [T/#0])->usize", "file_index": 3, - "first_line": 142, + "first_line": 137, "local": true }, { - "name": "/core/std::ptr::metadata(*const T/#0)->Alias(Projection, AliasTy { args: [T/#0], def_id: DefId(2:1750 ~ core[408d]::ptr::metadata::Pointee::Metadata) })", + "name": "/core/std::ptr::metadata(*const T/#0)->Alias(Projection, AliasTy { args: [T/#0], def_id: DefId(2:1879 ~ core[58e1]::ptr::metadata::Pointee::Metadata) })", "file_index": 4, "first_line": 94, "local": true @@ -175,7 +175,7 @@ commit; ], [ 3, - 143, + 138, 9, 6, 7 diff --git a/checker/tests/call_graph/fnptr_loop.rs b/checker/tests/call_graph/fnptr_loop.rs index 2513dd01..f76639d4 100644 --- a/checker/tests/call_graph/fnptr_loop.rs +++ b/checker/tests/call_graph/fnptr_loop.rs @@ -82,7 +82,7 @@ commit; "local": true }, { - "name": "/fnptr_loop/fn2(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_loop[4126]::fn2::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_loop/fn2(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_loop[821e]::fn2::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 12, "local": true diff --git a/checker/tests/call_graph/fnptr_slice.rs b/checker/tests/call_graph/fnptr_slice.rs index dfd9661a..0759280a 100644 --- a/checker/tests/call_graph/fnptr_slice.rs +++ b/checker/tests/call_graph/fnptr_slice.rs @@ -62,7 +62,7 @@ commit; ], "callables": [ { - "name": "/fnptr_slice/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_slice[df6f]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_slice/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_slice[c80f]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", "file_index": 0, "first_line": 10, "local": true diff --git a/checker/tests/call_graph/generic.rs b/checker/tests/call_graph/generic.rs index 44a62a64..f38888a1 100644 --- a/checker/tests/call_graph/generic.rs +++ b/checker/tests/call_graph/generic.rs @@ -74,7 +74,7 @@ commit; "local": true }, { - "name": "/generic/Gen::::bar(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:12 ~ generic[60ea]::{impl#0}::bar::'_), '_) }) Gen,T/#0)->()", + "name": "/generic/Gen::::bar(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:12 ~ generic[6dff]::{impl#0}::bar::'_), '_) }) Gen,T/#0)->()", "file_index": 0, "first_line": 14, "local": true diff --git a/checker/tests/call_graph/static_deduplicate.rs b/checker/tests/call_graph/static_deduplicate.rs index aaff64c4..4b9431d5 100644 --- a/checker/tests/call_graph/static_deduplicate.rs +++ b/checker/tests/call_graph/static_deduplicate.rs @@ -66,19 +66,19 @@ commit; ], "callables": [ { - "name": "/static_deduplicate/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ static_deduplicate[c483]::fn1::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ static_deduplicate[c483]::fn1::'_), '_) }) str)", + "name": "/static_deduplicate/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ static_deduplicate[7f6a]::fn1::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ static_deduplicate[7f6a]::fn1::'_), '_) }) str)", "file_index": 0, "first_line": 10, "local": true }, { - "name": "/static_deduplicate/fn2(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ static_deduplicate[c483]::fn2::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ static_deduplicate[c483]::fn2::'_), '_) }) str)", + "name": "/static_deduplicate/fn2(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ static_deduplicate[7f6a]::fn2::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ static_deduplicate[7f6a]::fn2::'_), '_) }) str)", "file_index": 0, "first_line": 13, "local": true }, { - "name": "/static_deduplicate/fn3(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:9 ~ static_deduplicate[c483]::fn3::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:9 ~ static_deduplicate[c483]::fn3::'_), '_) }) str)", + "name": "/static_deduplicate/fn3(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:9 ~ static_deduplicate[7f6a]::fn3::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:9 ~ static_deduplicate[7f6a]::fn3::'_), '_) }) str)", "file_index": 0, "first_line": 16, "local": true diff --git a/checker/tests/call_graph/static_fold.rs b/checker/tests/call_graph/static_fold.rs index 3a212d6f..13259a5c 100644 --- a/checker/tests/call_graph/static_fold.rs +++ b/checker/tests/call_graph/static_fold.rs @@ -64,10 +64,10 @@ commit; /* EXPECTED:CALL_SITES{ "files": [ "tests/call_graph/static_fold.rs", - "/rustc/1fdfe1234795a289af1088aefa92ef80191cb611/library/std/src/io/stdio.rs", - "/rustc/1fdfe1234795a289af1088aefa92ef80191cb611/library/core/src/fmt/mod.rs", - "/rustc/1fdfe1234795a289af1088aefa92ef80191cb611/library/core/src/slice/mod.rs", - "/rustc/1fdfe1234795a289af1088aefa92ef80191cb611/library/core/src/ptr/metadata.rs" + "/rustc/5ac4c8a63ee305742071ac6dd11817f7c24adce2/library/std/src/io/stdio.rs", + "/rustc/5ac4c8a63ee305742071ac6dd11817f7c24adce2/library/core/src/fmt/mod.rs", + "/rustc/5ac4c8a63ee305742071ac6dd11817f7c24adce2/library/core/src/slice/mod.rs", + "/rustc/5ac4c8a63ee305742071ac6dd11817f7c24adce2/library/core/src/ptr/metadata.rs" ], "callables": [ { @@ -95,25 +95,25 @@ commit; "local": true }, { - "name": "/std/std::io::_print(std::fmt::Arguments)->()", + "name": "/std/std::io::_print(std::fmt::Arguments)->()", "file_index": 1, "first_line": 1096, "local": false }, { - "name": "/core/std::fmt::Arguments::<'a>::new_const(&ReEarlyParam(DefId(2:9827 ~ core[408d]::fmt::{impl#2}::'a), 0, 'a) [&ReStatic str])->std::fmt::Arguments", + "name": "/core/std::fmt::Arguments::<'a>::new_const(&ReEarlyParam(DefId(2:9923 ~ core[58e1]::fmt::{impl#2}::'a), 0, 'a) [&ReStatic str])->std::fmt::Arguments", "file_index": 2, "first_line": 321, "local": false }, { - "name": "/core/core::slice::::len(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(2:59746 ~ core[408d]::slice::{impl#0}::len::'_), '_) }) [T/#0])->usize", + "name": "/core/core::slice::::len(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(2:59803 ~ core[58e1]::slice::{impl#0}::len::'_), '_) }) [T/#0])->usize", "file_index": 3, - "first_line": 142, + "first_line": 137, "local": true }, { - "name": "/core/std::ptr::metadata(*const T/#0)->Alias(Projection, AliasTy { args: [T/#0], def_id: DefId(2:1750 ~ core[408d]::ptr::metadata::Pointee::Metadata) })", + "name": "/core/std::ptr::metadata(*const T/#0)->Alias(Projection, AliasTy { args: [T/#0], def_id: DefId(2:1879 ~ core[58e1]::ptr::metadata::Pointee::Metadata) })", "file_index": 4, "first_line": 94, "local": true @@ -157,7 +157,7 @@ commit; ], [ 3, - 143, + 138, 9, 6, 7 diff --git a/checker/tests/call_graph/trait.rs b/checker/tests/call_graph/trait.rs index 4e3f255d..d72ca150 100644 --- a/checker/tests/call_graph/trait.rs +++ b/checker/tests/call_graph/trait.rs @@ -73,7 +73,7 @@ commit; "local": true }, { - "name": "/trait/::bar(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:13 ~ trait[6f4c]::{impl#0}::bar::'_), '_) }) Bar)->i32", + "name": "/trait/::bar(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:13 ~ trait[3ed6]::{impl#0}::bar::'_), '_) }) Bar)->i32", "file_index": 0, "first_line": 14, "local": true diff --git a/checker/tests/integration_tests.rs b/checker/tests/integration_tests.rs index 244c65ac..71e3f764 100644 --- a/checker/tests/integration_tests.rs +++ b/checker/tests/integration_tests.rs @@ -150,7 +150,7 @@ fn run_directory(directory_path: PathBuf) -> Vec<(String, String)> { files_and_temp_dirs } -fn build_options(early_error_handler: &EarlyErrorHandler) -> Options { +fn build_options(early_error_handler: &EarlyDiagCtxt) -> Options { let mut options = Options::default(); options.parse_from_str("", early_error_handler, true); // get defaults options.diag_level = DiagLevel::Paranoid; // override default @@ -256,7 +256,7 @@ fn invoke_driver_on_files( // Runs the single test case found in file_name, using temp_dir_path as the place // to put compiler output, which for Mirai includes the persistent summary store. fn invoke_driver( - early_error_handler: &EarlyErrorHandler, + early_error_handler: &EarlyDiagCtxt, file_name: String, temp_dir_path: String, sys_root: String, @@ -428,7 +428,7 @@ fn check_call_graph_output( // Default test driver fn start_driver(config: DriverConfig) -> usize { - let early_error_handler = EarlyErrorHandler::new(config::ErrorOutputType::default()); + let early_error_handler = EarlyDiagCtxt::new(config::ErrorOutputType::default()); let sys_root = utils::find_sysroot(); let options = build_options(&early_error_handler); self::invoke_driver( @@ -444,7 +444,7 @@ fn start_driver(config: DriverConfig) -> usize { // Test driver for call graph generation; // sets up call graph configuration. fn start_driver_call_graph(config: DriverConfig) -> usize { - let early_error_handler = EarlyErrorHandler::new(config::ErrorOutputType::default()); + let early_error_handler = EarlyDiagCtxt::new(config::ErrorOutputType::default()); let sys_root = utils::find_sysroot(); let mut options = build_options(&early_error_handler); let (call_graph_config, call_graph_config_path) = diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 3e104c55..625d031e 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2023-12-07" +channel = "nightly-2023-12-21" components = ["clippy", "rustfmt", "rustc-dev", "rust-src", "rust-std", "llvm-tools-preview"]