File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ pub(crate) struct Reentrant;
143143#[ note(
144144 "an ideal reproduction consists of the code before and some patch that then triggers the bug when applied and compiled again"
145145) ]
146- #[ note( "as a workaround, you can run {$run_cmd} to allow your project to compile" ) ]
146+ #[ note( "as a workaround, you can {$run_cmd} to allow your project to compile" ) ]
147147pub ( crate ) struct IncrementCompilation {
148148 pub run_cmd : String ,
149149 pub dep_node : String ,
Original file line number Diff line number Diff line change 11use std:: cell:: Cell ;
22
33use rustc_data_structures:: fingerprint:: Fingerprint ;
4+ use rustc_hir:: def_id:: LOCAL_CRATE ;
5+ use rustc_session:: utils:: was_invoked_from_cargo;
46use tracing:: instrument;
57
68use crate :: dep_graph:: { DepGraphData , SerializedDepNodeIndex } ;
@@ -66,10 +68,10 @@ fn incremental_verify_ich_failed<'tcx>(
6668 if old_in_panic {
6769 tcx. dcx ( ) . emit_err ( crate :: error:: Reentrant ) ;
6870 } else {
69- let run_cmd = if let Some ( crate_name ) = & tcx . sess . opts . crate_name {
70- format ! ( "`cargo clean -p {crate_name }` or `cargo clean`" )
71+ let run_cmd = if was_invoked_from_cargo ( ) {
72+ format ! ( "run `cargo clean -p {}` or `cargo clean`" , tcx . crate_name ( LOCAL_CRATE ) )
7173 } else {
72- "`cargo clean`" . to_string ( )
74+ "clean your build cache" . to_owned ( )
7375 } ;
7476
7577 let dep_node = tcx. dep_graph . data ( ) . unwrap ( ) . prev_node_of ( prev_index) ;
Original file line number Diff line number Diff line change @@ -1205,6 +1205,7 @@ impl OutputFilenames {
12051205 }
12061206
12071207 pub fn interface_path ( & self ) -> PathBuf {
1208+ debug ! ( "using crate_name={} for interface_path" , self . crate_stem) ;
12081209 self . out_directory . join ( format ! ( "lib{}.rs" , self . crate_stem) )
12091210 }
12101211
@@ -1214,6 +1215,7 @@ impl OutputFilenames {
12141215 let extension = flavor. extension ( ) ;
12151216 match flavor {
12161217 OutputType :: Metadata => {
1218+ debug ! ( "using crate_name={} for {extension}" , self . crate_stem) ;
12171219 self . out_directory . join ( format ! ( "lib{}.{}" , self . crate_stem, extension) )
12181220 }
12191221 _ => self . with_directory_and_extension ( & self . out_directory , extension) ,
@@ -1288,6 +1290,7 @@ impl OutputFilenames {
12881290 }
12891291
12901292 pub fn with_directory_and_extension ( & self , directory : & Path , extension : & str ) -> PathBuf {
1293+ debug ! ( "using filestem={} for {extension}" , self . filestem) ;
12911294 let mut path = directory. join ( & self . filestem ) ;
12921295 path. set_extension ( extension) ;
12931296 path
You can’t perform that action at this time.
0 commit comments