diff --git a/binaries/summary_store.tar b/binaries/summary_store.tar index 0d78edea..0ea38bd6 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 f564fa87..cb4dd43d 100644 --- a/checker/src/block_visitor.rs +++ b/checker/src/block_visitor.rs @@ -365,7 +365,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com if !self.bv.cv.constant_time_tag_not_found { self.bv.cv.constant_time_tag_not_found = true; let span = self.bv.current_span; - let warning = self.bv.cv.session.struct_span_warn( + let warning = self.bv.cv.session.dcx().struct_span_warn( span, format!( "unknown tag type for constant-time verification: {tag_name}", @@ -960,7 +960,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com } _ => { // Give a diagnostic about this call, and make it the programmer's problem. - let warning = self.bv.cv.session.struct_span_warn( + let warning = self.bv.cv.session.dcx().struct_span_warn( self.bv.current_span, "the called function did not resolve to an implementation with a MIR body", ); @@ -1025,7 +1025,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com } match specialized_closure_ty.kind() { TyKind::Closure(def_id, args) - | TyKind::Coroutine(def_id, args, _) + | TyKind::Coroutine(def_id, args) | TyKind::FnDef(def_id, args) => { return extract_func_ref(self.visit_function_reference( *def_id, @@ -1156,6 +1156,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com .bv .cv .session + .dcx() .struct_span_warn(span, diagnostic.as_ref().to_string()); for pc_span in precondition.spans.iter() { let snippet = self.bv.tcx.sess.source_map().span_to_snippet(*pc_span); @@ -1193,7 +1194,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com self.bv.post_condition_block = Some(this_block); } else { let span = self.bv.current_span; - let warning = self.bv.cv.session.struct_span_warn( + let warning = self.bv.cv.session.dcx().struct_span_warn( span, "multiple post conditions must be on the same execution path", ); @@ -1232,7 +1233,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com let span = self.bv.current_span.source_callsite(); let message = "this is unreachable, mark it as such by using the verify_unreachable! macro"; - let warning = self.bv.cv.session.struct_span_warn(span, message); + let warning = self.bv.cv.session.dcx().struct_span_warn(span, message); self.bv.emit_diagnostic(warning); return None; } @@ -1249,7 +1250,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com } else { "possible unsatisfied postcondition" }; - let warning = self.bv.cv.session.struct_span_warn(span, msg); + let warning = self.bv.cv.session.dcx().struct_span_warn(span, msg); self.bv.emit_diagnostic(warning); // Don't add the post condition to the summary return None; @@ -1269,6 +1270,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com .bv .cv .session + .dcx() .struct_span_warn(span, "provably false verification condition"); self.bv.emit_diagnostic(warning); if entry_cond_as_bool.is_none() @@ -1315,7 +1317,12 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com ) { let span = self.bv.current_span.source_callsite(); - let warning = self.bv.cv.session.struct_span_warn(span, warning.clone()); + let warning = self + .bv + .cv + .session + .dcx() + .struct_span_warn(span, warning.clone()); self.bv.emit_diagnostic(warning); } } @@ -1396,7 +1403,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com || self.bv.preconditions.len() >= k_limits::MAX_INFERRED_PRECONDITIONS { let span = self.bv.current_span.source_callsite(); - let warning = self.bv.cv.session.struct_span_warn( + let warning = self.bv.cv.session.dcx().struct_span_warn( span, format!( "the {} {} have a {} tag", @@ -1410,7 +1417,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com || tag_check.extract_promotable_disjuncts(false).is_none() { let span = self.bv.current_span.source_callsite(); - let warning = self.bv.cv.session.struct_span_warn( + let warning = self.bv.cv.session.dcx().struct_span_warn( span, format!( "the {value_name} may have a {tag_name} tag, \ @@ -1426,11 +1433,11 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com // The existence of the tag on the value is different from the expectation. // In this case, report an error. let span = self.bv.current_span.source_callsite(); - let warning = self - .bv - .cv - .session - .struct_span_warn(span, format!("the {value_name} has a {tag_name} tag")); + let warning = + self.bv.cv.session.dcx().struct_span_warn( + span, + format!("the {value_name} has a {tag_name} tag"), + ); self.bv.emit_diagnostic(warning); } @@ -1536,8 +1543,12 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com if entry_cond_as_bool.unwrap_or(false) { let error = get_assert_msg_description(msg); let span = self.bv.current_span; - let warning = - self.bv.cv.session.struct_span_warn(span, error.to_string()); + let warning = self + .bv + .cv + .session + .dcx() + .struct_span_warn(span, error.to_string()); self.bv.emit_diagnostic(warning); // No need to push a precondition, the caller can never satisfy it. return; @@ -1571,7 +1582,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com // Can't make this the caller's problem. let warning = format!("possible {}", get_assert_msg_description(msg)); let span = self.bv.current_span; - let warning = self.bv.cv.session.struct_span_warn(span, warning); + let warning = self.bv.cv.session.dcx().struct_span_warn(span, warning); self.bv.emit_diagnostic(warning); return; } @@ -1654,6 +1665,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com .bv .cv .session + .dcx() .struct_span_warn(span, "Inline assembly code cannot be analyzed by MIRAI."); self.bv.emit_diagnostic(warning); // Don't stop the analysis if we are building a call graph. @@ -2589,7 +2601,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com } } mir::AggregateKind::Closure(def_id, args) - | mir::AggregateKind::Coroutine(def_id, args, _) => { + | mir::AggregateKind::Coroutine(def_id, args) => { let ty = self.bv.tcx.type_of(*def_id).skip_binder(); let func_const = self.visit_function_reference(*def_id, ty, Some(args)); let func_val = Rc::new(func_const.clone().into()); @@ -3608,7 +3620,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com TyKind::Adt(adt_def, _) => adt_def .discriminants(self.bv.tcx) .find(|(_, var)| var.val == data), - TyKind::Coroutine(def_id, args, _) => { + TyKind::Coroutine(def_id, args) => { let generator = args.as_coroutine(); generator .discriminants(*def_id, self.bv.tcx) @@ -3906,8 +3918,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com let len_path = Path::new_length(base_path.clone()); self.bv.update_value_at(len_path, len_val); } - TyKind::Closure(def_id, generic_args) - | TyKind::Coroutine(def_id, generic_args, _) => { + TyKind::Closure(def_id, generic_args) | TyKind::Coroutine(def_id, generic_args) => { let func_const = self.visit_function_reference(*def_id, ty, Some(generic_args)); let func_val = Rc::new(func_const.clone().into()); self.bv @@ -3918,7 +3929,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com rustc_middle::ty::AliasTy { def_id, .. }, ) => { if let TyKind::Closure(def_id, generic_args) - | TyKind::Coroutine(def_id, generic_args, _) = + | TyKind::Coroutine(def_id, generic_args) = self.bv.tcx.type_of(*def_id).skip_binder().kind() { let func_const = diff --git a/checker/src/body_visitor.rs b/checker/src/body_visitor.rs index 898fc727..6a98de66 100644 --- a/checker/src/body_visitor.rs +++ b/checker/src/body_visitor.rs @@ -309,6 +309,7 @@ impl<'analysis, 'compilation, 'tcx> BodyVisitor<'analysis, 'compilation, 'tcx> { let warning = self .cv .session + .dcx() .struct_span_warn(self.current_span, "The analysis of this function timed out"); self.emit_diagnostic(warning); } @@ -1130,7 +1131,7 @@ impl<'analysis, 'compilation, 'tcx> BodyVisitor<'analysis, 'compilation, 'tcx> { if entry_cond_as_bool.unwrap_or(true) && !in_range_as_bool.unwrap_or(true) { let span = self.current_span; let message = "effective offset is outside allocated range"; - let warning = self.cv.session.struct_span_warn(span, message); + let warning = self.cv.session.dcx().struct_span_warn(span, message); self.emit_diagnostic(warning); } } @@ -1563,7 +1564,7 @@ impl<'analysis, 'compilation, 'tcx> BodyVisitor<'analysis, 'compilation, 'tcx> { ) = (old_layout, new_layout) { if *old_source == LayoutSource::DeAlloc { - let warning = self.cv.session.struct_span_warn( + let warning = self.cv.session.dcx().struct_span_warn( self.current_span, "the pointer points to memory that has already been deallocated", ); @@ -1589,7 +1590,11 @@ impl<'analysis, 'compilation, 'tcx> BodyVisitor<'analysis, 'compilation, 'tcx> { "deallocates" } ); - let warning = self.cv.session.struct_span_warn(self.current_span, message); + let warning = self + .cv + .session + .dcx() + .struct_span_warn(self.current_span, message); self.emit_diagnostic(warning); } } @@ -2014,7 +2019,7 @@ impl<'analysis, 'compilation, 'tcx> BodyVisitor<'analysis, 'compilation, 'tcx> { &self.type_visitor().generic_argument_map, ); if source_field_index >= source_len { - let warning = self.cv.session.struct_span_warn( + let warning = self.cv.session.dcx().struct_span_warn( self.current_span, "The union is not fully initialized by this assignment", ); @@ -2101,7 +2106,7 @@ impl<'analysis, 'compilation, 'tcx> BodyVisitor<'analysis, 'compilation, 'tcx> { // Get another field source_field_index += 1; if source_field_index >= source_len { - let warning = self.cv.session.struct_span_warn( + let warning = self.cv.session.dcx().struct_span_warn( self.current_span, "The union is not fully initialized by this assignment", ); diff --git a/checker/src/call_visitor.rs b/checker/src/call_visitor.rs index 4c659cd0..7ff5f2c1 100644 --- a/checker/src/call_visitor.rs +++ b/checker/src/call_visitor.rs @@ -791,6 +791,7 @@ impl<'call, 'block, 'analysis, 'compilation, 'tcx> .bv .cv .session + .dcx() .struct_span_warn(span, message); self.block_visitor.bv.emit_diagnostic(warning); return; @@ -811,6 +812,7 @@ impl<'call, 'block, 'analysis, 'compilation, 'tcx> .bv .cv .session + .dcx() .struct_span_warn(span, message); self.block_visitor.bv.emit_diagnostic(warning); } @@ -942,6 +944,7 @@ impl<'call, 'block, 'analysis, 'compilation, 'tcx> .bv .cv .session + .dcx() .struct_span_warn(span, msg.to_string()); self.block_visitor.bv.emit_diagnostic(warning); } else { @@ -967,6 +970,7 @@ impl<'call, 'block, 'analysis, 'compilation, 'tcx> .bv .cv .session + .dcx() .struct_span_warn(span, msg.to_string()); self.block_visitor.bv.emit_diagnostic(warning); } @@ -1015,6 +1019,7 @@ impl<'call, 'block, 'analysis, 'compilation, 'tcx> .bv .cv .session + .dcx() .struct_span_warn(span, msg.to_string()); self.block_visitor.bv.emit_diagnostic(warning); } else { @@ -1088,10 +1093,11 @@ impl<'call, 'block, 'analysis, 'compilation, 'tcx> self.block_visitor.bv.preconditions.push(precondition); } _ => { - let warning = self.block_visitor.bv.cv.session.struct_span_warn( - self.block_visitor.bv.current_span, - warning.to_string(), - ); + let warning = + self.block_visitor.bv.cv.session.dcx().struct_span_warn( + self.block_visitor.bv.current_span, + warning.to_string(), + ); self.block_visitor.bv.emit_diagnostic(warning); } } @@ -1270,7 +1276,7 @@ impl<'call, 'block, 'analysis, 'compilation, 'tcx> args.as_closure().args, &self.type_visitor().generic_argument_map, )), - TyKind::Coroutine(_, args, _) => Some(self.type_visitor().specialize_generic_args( + TyKind::Coroutine(_, args) => Some(self.type_visitor().specialize_generic_args( args.as_coroutine().args, &self.type_visitor().generic_argument_map, )), @@ -1388,7 +1394,7 @@ impl<'call, 'block, 'analysis, 'compilation, 'tcx> // Check if the tagged value has a pointer type (e.g., a reference). // Emit an warning message if so. if self.block_visitor.bv.check_for_errors && source_rustc_type.is_any_ptr() { - let warning = self.block_visitor.bv.cv.session.struct_span_warn( + let warning = self.block_visitor.bv.cv.session.dcx().struct_span_warn( self.block_visitor.bv.current_span, "the macro add_tag! expects its argument to be a reference to a non-reference value", ); @@ -1504,7 +1510,7 @@ impl<'call, 'block, 'analysis, 'compilation, 'tcx> // Check if the tagged value has a pointer type (e.g., a reference). // Emit a warning message if so. if self.block_visitor.bv.check_for_errors && source_rustc_type.is_any_ptr() { - let warning = self.block_visitor.bv.cv.session.struct_span_warn( + let warning = self.block_visitor.bv.cv.session.dcx().struct_span_warn( self.block_visitor.bv.current_span, format!( "the macro {} expects its first argument to be a reference to a non-reference value", @@ -1853,6 +1859,7 @@ impl<'call, 'block, 'analysis, 'compilation, 'tcx> .bv .cv .session + .dcx() .struct_span_warn(span, "preconditions should be reached unconditionally"); self.block_visitor.bv.emit_diagnostic(warning); self.block_visitor.bv.check_for_unconditional_precondition = false; @@ -2529,7 +2536,7 @@ impl<'call, 'block, 'analysis, 'compilation, 'tcx> if !self.callee_def_id.is_local() && self.block_visitor.bv.cv.options.diag_level != DiagLevel::Default { - let warning = self.block_visitor.bv.cv.session.struct_span_warn( + let warning = self.block_visitor.bv.cv.session.dcx().struct_span_warn( self.block_visitor.bv.current_span, "the called function could not be completely analyzed", ); @@ -3030,7 +3037,7 @@ impl<'call, 'block, 'analysis, 'compilation, 'tcx> } } if self.block_visitor.bv.check_for_errors { - let warning = self.block_visitor.bv.cv.session.struct_span_warn( + let warning = self.block_visitor.bv.cv.session.dcx().struct_span_warn( self.block_visitor.bv.current_span, "this argument should be a string literal, do not call this function directly", ); @@ -3080,7 +3087,7 @@ impl<'call, 'block, 'analysis, 'compilation, 'tcx> } _ => { if self.block_visitor.bv.check_for_errors { - let warning = self.block_visitor.bv.cv.session.struct_span_warn( + let warning = self.block_visitor.bv.cv.session.dcx().struct_span_warn( self.block_visitor.bv.current_span, "the tag type should be a generic type whose first parameter is a constant of type TagPropagationSet", ); @@ -3099,7 +3106,7 @@ impl<'call, 'block, 'analysis, 'compilation, 'tcx> } _ => { if self.block_visitor.bv.check_for_errors { - let warning = self.block_visitor.bv.cv.session.struct_span_warn( + let warning = self.block_visitor.bv.cv.session.dcx().struct_span_warn( self.block_visitor.bv.current_span, "the first parameter of the tag type should have type TagPropagationSet", ); diff --git a/checker/src/callbacks.rs b/checker/src/callbacks.rs index ab1943fb..e3b982f3 100644 --- a/checker/src/callbacks.rs +++ b/checker/src/callbacks.rs @@ -104,7 +104,7 @@ impl rustc_driver::Callbacks for MiraiCallbacks { compiler: &interface::Compiler, queries: &'tcx Queries<'tcx>, ) -> Compilation { - compiler.sess.abort_if_errors(); + compiler.sess.dcx().abort_if_errors(); if self .output_directory .to_str() diff --git a/checker/src/crate_visitor.rs b/checker/src/crate_visitor.rs index 5bda76a1..d1ded56f 100644 --- a/checker/src/crate_visitor.rs +++ b/checker/src/crate_visitor.rs @@ -262,6 +262,7 @@ impl<'compilation, 'tcx> CrateVisitor<'compilation, 'tcx> { } if !expected_errors.check_messages(diags) { self.session + .dcx() .fatal(format!("test failed: {}", self.file_name)); } } else { diff --git a/checker/src/expected_errors.rs b/checker/src/expected_errors.rs index 7d7d2304..79872af3 100644 --- a/checker/src/expected_errors.rs +++ b/checker/src/expected_errors.rs @@ -35,11 +35,11 @@ impl ExpectedErrors { #[logfn_inputs(TRACE)] pub fn check_messages(&mut self, diagnostics: Vec) -> bool { for diag in diagnostics.iter() { - if !self.remove_message(&diag.span, Self::expect_str(&diag.styled_message()[0].0)) { + if !self.remove_message(&diag.span, Self::expect_str(&diag.messages()[0].0)) { return false; } for child in &diag.children { - if !self.remove_message(&child.span, Self::expect_str(&child.message[0].0)) { + if !self.remove_message(&child.span, Self::expect_str(&child.messages[0].0)) { return false; } } diff --git a/checker/src/fixed_point_visitor.rs b/checker/src/fixed_point_visitor.rs index 101163ae..83245d8b 100644 --- a/checker/src/fixed_point_visitor.rs +++ b/checker/src/fixed_point_visitor.rs @@ -160,7 +160,7 @@ impl<'fixed, 'analysis, 'compilation, 'tcx> if changed { if self.bv.cv.options.diag_level == DiagLevel::Paranoid { let span = self.bv.current_span; - let warning = self.bv.cv.session.struct_span_warn( + let warning = self.bv.cv.session.dcx().struct_span_warn( span, format!( "Fixed point loop iterations exceeded limit of {}", diff --git a/checker/src/main.rs b/checker/src/main.rs index 12a332b6..576e5325 100644 --- a/checker/src/main.rs +++ b/checker/src/main.rs @@ -59,7 +59,7 @@ fn main() { .map(|(i, arg)| { arg.into_string().unwrap_or_else(|arg| { early_error_handler - .early_error(format!("Argument {i} is not valid Unicode: {arg:?}")) + .early_fatal(format!("Argument {i} is not valid Unicode: {arg:?}")) }) }) .collect::>(); diff --git a/checker/src/options.rs b/checker/src/options.rs index b8640637..90323612 100644 --- a/checker/src/options.rs +++ b/checker/src/options.rs @@ -115,7 +115,7 @@ impl Options { ) -> Vec { self.parse( &shellwords::split(s).unwrap_or_else(|e| { - handler.early_error(format!("Cannot parse argument string: {e:?}")) + handler.early_fatal(format!("Cannot parse argument string: {e:?}")) }), handler, running_test_harness, @@ -203,7 +203,7 @@ impl Options { match matches.get_one::("body_analysis_timeout") { Some(s) => match s.parse::() { Ok(v) => v, - Err(_) => handler.early_error("--body_analysis_timeout expects an integer"), + Err(_) => handler.early_fatal("--body_analysis_timeout expects an integer"), }, None => assume_unreachable!(), } @@ -214,7 +214,7 @@ impl Options { { Some(s) => match s.parse::() { Ok(v) => v, - Err(_) => handler.early_error("--crate_analysis_timeout expects an integer"), + Err(_) => handler.early_fatal("--crate_analysis_timeout expects an integer"), }, None => assume_unreachable!(), } diff --git a/checker/src/type_visitor.rs b/checker/src/type_visitor.rs index 9fb4a96b..e3b26014 100644 --- a/checker/src/type_visitor.rs +++ b/checker/src/type_visitor.rs @@ -159,7 +159,7 @@ impl<'tcx> TypeVisitor<'tcx> { } } } - TyKind::Coroutine(_, args, _) => { + TyKind::Coroutine(_, args) => { for (i, ty) in args.as_coroutine().prefix_tys().iter().enumerate() { let var_type = ExpressionType::from(ty.kind()); let mut qualifier = path.clone(); @@ -503,7 +503,7 @@ impl<'tcx> TypeVisitor<'tcx> { }); } } - TyKind::Coroutine(def_id, args, _) => { + TyKind::Coroutine(def_id, args) => { let mut tuple_types = args.as_coroutine().state_tys(*def_id, self.tcx); if let Some(field_tys) = tuple_types.nth(*ordinal) { @@ -959,7 +959,7 @@ impl<'tcx> TypeVisitor<'tcx> { let variant = &def.variants()[*ordinal]; let field_tys = variant.fields.iter().map(|fd| fd.ty(self.tcx, args)); return Ty::new_tup_from_iter(self.tcx, field_tys); - } else if let TyKind::Coroutine(def_id, args, _) = base_ty.kind() { + } else if let TyKind::Coroutine(def_id, args) = base_ty.kind() { let mut tuple_types = args.as_coroutine().state_tys(*def_id, self.tcx); if let Some(field_tys) = tuple_types.nth(ordinal.index()) { return Ty::new_tup_from_iter(self.tcx, field_tys); @@ -1239,12 +1239,9 @@ impl<'tcx> TypeVisitor<'tcx> { closures_being_specialized.remove(def_id); specialized_closure } - TyKind::Coroutine(def_id, args, movability) => Ty::new_coroutine( - self.tcx, - *def_id, - self.specialize_generic_args(args, map), - *movability, - ), + TyKind::Coroutine(def_id, args) => { + Ty::new_coroutine(self.tcx, *def_id, self.specialize_generic_args(args, map)) + } TyKind::CoroutineWitness(def_id, args) => { let specialized_types = self.specialize_generic_args(args, map); Ty::new_coroutine_witness(self.tcx, *def_id, specialized_types) diff --git a/checker/src/utils.rs b/checker/src/utils.rs index 0b509344..a60c2a33 100644 --- a/checker/src/utils.rs +++ b/checker/src/utils.rs @@ -131,7 +131,7 @@ pub fn is_public(def_id: DefId, tcx: TyCtxt<'_>) -> bool { .opt_def_id() .map_or_else( || { - tcx.sess.span_delayed_bug( + tcx.sess.dcx().span_delayed_bug( tr.path.span, "trait without a def-id", ); @@ -257,7 +257,7 @@ fn append_mangled_type<'tcx>(str: &mut String, ty: Ty<'tcx>, tcx: TyCtxt<'tcx>) } } } - TyKind::Coroutine(def_id, subs, _) => { + TyKind::Coroutine(def_id, subs) => { str.push_str("coroutine_"); str.push_str(qualified_type_name(tcx, *def_id).as_str()); for sub in subs.as_coroutine().args { @@ -505,7 +505,7 @@ pub fn is_concrete(ty: &TyKind<'_>) -> bool { TyKind::Adt(_, gen_args) | TyKind::Closure(_, gen_args) | TyKind::FnDef(_, gen_args) - | TyKind::Coroutine(_, gen_args, _) + | TyKind::Coroutine(_, gen_args) | TyKind::Alias(_, rustc_middle::ty::AliasTy { args: gen_args, .. }) => { are_concrete(gen_args) } diff --git a/checker/tests/call_graph/fnptr.rs b/checker/tests/call_graph/fnptr.rs index 3669eb61..6fec46f3 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[a4a0]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr[7a8d]::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 21437a49..d4721fb0 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[5a5f]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_clean/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_clean[1be2]::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 3f4bd64c..a708f5ff 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[09c2]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_deduplicate/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_deduplicate[535a]::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 4ac1ee22..97d06fa1 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[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", + "name": "/fnptr_dom/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_dom[7513]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:8 ~ fnptr_dom[7513]::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 47f482c7..6100cb67 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[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", + "name": "/fnptr_dom_loop/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_dom_loop[bcc6]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:9 ~ fnptr_dom_loop[bcc6]::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 a63566a1..63ce6c24 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[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", + "name": "/fnptr_dom_loop_souffle/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ fnptr_dom_loop_souffle[9ccc]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []),&ReBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed(DefId(0:9 ~ fnptr_dom_loop_souffle[9ccc]::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 9c513191..92244a86 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/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" + "/rustc/3cdd004e55c869faa2b7b25efd3becf50346e7d6/library/std/src/io/stdio.rs", + "/rustc/3cdd004e55c869faa2b7b25efd3becf50346e7d6/library/core/src/fmt/mod.rs", + "/rustc/3cdd004e55c869faa2b7b25efd3becf50346e7d6/library/core/src/slice/mod.rs", + "/rustc/3cdd004e55c869faa2b7b25efd3becf50346e7d6/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[6cc8]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_fold/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_fold[e0d1]::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:9923 ~ core[58e1]::fmt::{impl#2}::'a), 0, 'a) [&ReStatic str])->std::fmt::Arguments", + "name": "/core/std::fmt::Arguments::<'a>::new_const(&ReEarlyParam(DefId(2:9935 ~ core[32af]::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:59803 ~ core[58e1]::slice::{impl#0}::len::'_), '_) }) [T/#0])->usize", + "name": "/core/core::slice::::len(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(2:59819 ~ core[32af]::slice::{impl#0}::len::'_), '_) }) [T/#0])->usize", "file_index": 3, "first_line": 137, "local": true }, { - "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) })", + "name": "/core/std::ptr::metadata(*const T/#0)->Alias(Projection, AliasTy { args: [T/#0], def_id: DefId(2:1880 ~ core[32af]::ptr::metadata::Pointee::Metadata) })", "file_index": 4, "first_line": 94, "local": true diff --git a/checker/tests/call_graph/fnptr_loop.rs b/checker/tests/call_graph/fnptr_loop.rs index f76639d4..b41b45ae 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[821e]::fn2::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_loop/fn2(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_loop[ae6f]::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 0759280a..eaceee14 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[c80f]::fn1::'_), '_) }) Binder(fn(u32) -> u32, []))->u32", + "name": "/fnptr_slice/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ fnptr_slice[ebf1]::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 f38888a1..727668bf 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[6dff]::{impl#0}::bar::'_), '_) }) Gen,T/#0)->()", + "name": "/generic/Gen::::bar(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:12 ~ generic[01cf]::{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 4b9431d5..97c85d52 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[7f6a]::fn1::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ static_deduplicate[7f6a]::fn1::'_), '_) }) str)", + "name": "/static_deduplicate/fn1(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ static_deduplicate[671b]::fn1::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:7 ~ static_deduplicate[671b]::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[7f6a]::fn2::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ static_deduplicate[7f6a]::fn2::'_), '_) }) str)", + "name": "/static_deduplicate/fn2(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ static_deduplicate[671b]::fn2::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:8 ~ static_deduplicate[671b]::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[7f6a]::fn3::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:9 ~ static_deduplicate[7f6a]::fn3::'_), '_) }) str)", + "name": "/static_deduplicate/fn3(u32,&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:9 ~ static_deduplicate[671b]::fn3::'_), '_) }) str)->(u32, &ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:9 ~ static_deduplicate[671b]::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 13259a5c..d9bba665 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/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" + "/rustc/3cdd004e55c869faa2b7b25efd3becf50346e7d6/library/std/src/io/stdio.rs", + "/rustc/3cdd004e55c869faa2b7b25efd3becf50346e7d6/library/core/src/fmt/mod.rs", + "/rustc/3cdd004e55c869faa2b7b25efd3becf50346e7d6/library/core/src/slice/mod.rs", + "/rustc/3cdd004e55c869faa2b7b25efd3becf50346e7d6/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:9923 ~ core[58e1]::fmt::{impl#2}::'a), 0, 'a) [&ReStatic str])->std::fmt::Arguments", + "name": "/core/std::fmt::Arguments::<'a>::new_const(&ReEarlyParam(DefId(2:9935 ~ core[32af]::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:59803 ~ core[58e1]::slice::{impl#0}::len::'_), '_) }) [T/#0])->usize", + "name": "/core/core::slice::::len(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(2:59819 ~ core[32af]::slice::{impl#0}::len::'_), '_) }) [T/#0])->usize", "file_index": 3, "first_line": 137, "local": true }, { - "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) })", + "name": "/core/std::ptr::metadata(*const T/#0)->Alias(Projection, AliasTy { args: [T/#0], def_id: DefId(2:1880 ~ core[32af]::ptr::metadata::Pointee::Metadata) })", "file_index": 4, "first_line": 94, "local": true diff --git a/checker/tests/call_graph/trait.rs b/checker/tests/call_graph/trait.rs index d72ca150..f1de1a2e 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[3ed6]::{impl#0}::bar::'_), '_) }) Bar)->i32", + "name": "/trait/::bar(&ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:13 ~ trait[c69b]::{impl#0}::bar::'_), '_) }) Bar)->i32", "file_index": 0, "first_line": 14, "local": true diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 625d031e..6af52478 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2023-12-21" +channel = "nightly-2023-12-30" components = ["clippy", "rustfmt", "rustc-dev", "rust-src", "rust-std", "llvm-tools-preview"]