From e1f73ea91bffc686c692d1dbd5678cd339e8de8e Mon Sep 17 00:00:00 2001 From: hermanventer Date: Mon, 15 Jul 2024 12:13:15 -0700 Subject: [PATCH] nightly-2023-12-21 --- Cargo.lock | 4 ++-- binaries/summary_store.tar | Bin 3000320 -> 3000832 bytes checker/src/block_visitor.rs | 2 +- checker/src/crate_visitor.rs | 2 +- checker/src/main.rs | 2 +- checker/src/options.rs | 6 ++--- checker/src/utils.rs | 13 +++++++---- checker/tests/call_graph/fnptr.rs | 2 +- checker/tests/call_graph/fnptr_clean.rs | 2 +- checker/tests/call_graph/fnptr_deduplicate.rs | 2 +- checker/tests/call_graph/fnptr_dom.rs | 2 +- checker/tests/call_graph/fnptr_dom_loop.rs | 2 +- .../call_graph/fnptr_dom_loop_souffle.rs | 2 +- checker/tests/call_graph/fnptr_fold.rs | 22 +++++++++--------- checker/tests/call_graph/fnptr_loop.rs | 2 +- checker/tests/call_graph/fnptr_slice.rs | 2 +- checker/tests/call_graph/generic.rs | 2 +- .../tests/call_graph/static_deduplicate.rs | 6 ++--- checker/tests/call_graph/static_fold.rs | 20 ++++++++-------- checker/tests/call_graph/trait.rs | 2 +- checker/tests/integration_tests.rs | 8 +++---- rust-toolchain.toml | 2 +- 22 files changed, 56 insertions(+), 51 deletions(-) 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 b36ea95a24a219fcc5e3e8bc77ef7afbff067052..0d78edeafdd76428ee8a43af6694bba9dfba87bd 100644 GIT binary patch delta 5213 zcmd^D`(I62*gwZvy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ngZ@ZFO#k|#n{S8BWKb;wR5j4K!=)9hkQ`a$5`v+Nn?eUbmWkOxpOef6 z4y?qTQyPN8$z(LQQFpe0IgiDVorXtS$&W}bhEEIGTzHwsdXV)SuDm3tkX+bA{=ABH z)8)lZdP2TO64DCUmr#a!i{{EMO>tV}Qj&CZFE z>np`#v^c23Oy=E6S)AY$d3;7RDsktX5=E*KZQP;iAS)vCy6ED_Yz!CGbQItF%nc44 z!fjK2C|{+15~qL16!80w#Y)Rx1x$O(Oe9N->}HVDxNs44Il@}QtO_;=(hsA0PowIS zaWt1`x;I(w9ASBvZ4`i4M<3Y>n;jC0OOQra{cFG=^Gtx)UW`);23Ks7_c9ZLC#1gbP z017mS8&9&Sf|K*GOnG~ zzi`AH`jbTy*PO0h@sU)jiHALZuwYngF}Xv!#U#SOn|OHtszh%b;ia0mcVS<1`${!1{%`EQ##`upT?rqC{ZNYiFyU|38Kwr9 zoM6>$yb#a554w>dB3!x6hLUulbyuRM-ySM`P2Lc7mn9j-AN^#VT%RMZc_WH8%`}4h z-eF#XVZw`~y>k5>u@o&1Fyhmei+R;O)>GilHm0mXUbfcsz>9A@Y`W{jKfY+X;IS{k z+|rTPIh(6J_=r$*j-LOJV7~3alT*zhdVVj}HAaY{* 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"]