@@ -70,7 +70,7 @@ fn run_genmc_mode_impl<'tcx>(
70
70
71
71
// Execute the program until completion to get the return value, or return if an error happens:
72
72
let Some ( return_code) = eval_entry ( genmc_ctx. clone ( ) ) else {
73
- genmc_ctx. print_genmc_output ( genmc_config) ;
73
+ genmc_ctx. print_genmc_output ( genmc_config, tcx ) ;
74
74
return None ;
75
75
} ;
76
76
@@ -97,7 +97,7 @@ fn run_genmc_mode_impl<'tcx>(
97
97
// Since we don't have any span information for the error at this point,
98
98
// we just print GenMC's error string, and the full GenMC output if requested.
99
99
eprintln ! ( "(GenMC) Error detected: {error}" ) ;
100
- genmc_ctx. print_genmc_output ( genmc_config) ;
100
+ genmc_ctx. print_genmc_output ( genmc_config, tcx ) ;
101
101
return None ;
102
102
}
103
103
}
@@ -110,13 +110,13 @@ impl GenmcCtx {
110
110
///
111
111
/// This message can be very verbose and is likely not useful for the average user.
112
112
/// This function should be called *after* Miri has printed all of its output.
113
- fn print_genmc_output ( & self , genmc_config : & GenmcConfig ) {
113
+ fn print_genmc_output ( & self , genmc_config : & GenmcConfig , tcx : TyCtxt < ' _ > ) {
114
114
if genmc_config. print_genmc_output {
115
115
eprintln ! ( "GenMC error report:" ) ;
116
116
eprintln ! ( "{}" , self . get_result_message( ) ) ;
117
117
} else {
118
- eprintln ! (
119
- "(Add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report.) "
118
+ tcx . dcx ( ) . note (
119
+ "add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report"
120
120
) ;
121
121
}
122
122
}
0 commit comments