@@ -673,8 +673,8 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
673673 }
674674
675675 /// Encode source map using the provided set of required source files.
676- /// This is used both for rmeta (when separate_spans is disabled) and
677- /// for the span file (when separate_spans is enabled).
676+ /// This is used both for rmeta (when stable_crate_hash is disabled) and
677+ /// for the span file (when stable_crate_hash is enabled).
678678 fn encode_source_map_with (
679679 & mut self ,
680680 required_source_files : FxIndexSet < usize > ,
@@ -853,9 +853,9 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
853853
854854 // Encode source_map. This needs to be done last, because encoding `Span`s tells us which
855855 // `SourceFiles` we actually need to encode.
856- // When separate_spans is enabled, source_map goes in the span file instead.
856+ // When stable_crate_hash is enabled, source_map goes in the span file instead.
857857 let source_map = stat ! ( "source-map" , || {
858- if self . tcx. sess. opts. unstable_opts. separate_spans {
858+ if self . tcx. sess. opts. unstable_opts. stable_crate_hash {
859859 // Don't encode source_map in rmeta; it will be in the .spans file.
860860 // Keep required_source_files for the span file encoding.
861861 TableBuilder :: default ( ) . encode( & mut self . opaque)
@@ -924,7 +924,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
924924 expn_hashes,
925925 def_path_hash_map,
926926 specialization_enabled_in: tcx. specialization_enabled_in( LOCAL_CRATE ) ,
927- has_separate_spans : tcx. sess. opts. unstable_opts. separate_spans ,
927+ has_stable_crate_hash : tcx. sess. opts. unstable_opts. stable_crate_hash ,
928928 } )
929929 } ) ;
930930
@@ -2650,7 +2650,7 @@ impl<D: Decoder> Decodable<D> for EncodedMetadata {
26502650}
26512651
26522652/// Encodes crate metadata to the given path.
2653- /// Returns the set of required source files if `-Z separate_spans ` is enabled,
2653+ /// Returns the set of required source files if `-Z stable-crate-hash ` is enabled,
26542654/// which is needed for encoding the span file.
26552655#[ instrument( level = "trace" , skip( tcx) ) ]
26562656pub fn encode_metadata (
@@ -2697,7 +2697,7 @@ pub fn encode_metadata(
26972697 Ok ( _) => { }
26982698 Err ( err) => tcx. dcx ( ) . emit_fatal ( FailCreateFileEncoder { err } ) ,
26992699 } ;
2700- if tcx. sess . opts . unstable_opts . separate_spans
2700+ if tcx. sess . opts . unstable_opts . stable_crate_hash
27012701 && let Some ( saved_spans) = work_product. saved_files . get ( "spans" )
27022702 {
27032703 let span_source =
@@ -2778,7 +2778,7 @@ pub fn encode_spans(
27782778}
27792779
27802780/// Encodes metadata with standard header.
2781- /// Returns the required_source_files if separate_spans is enabled (for span file encoding).
2781+ /// Returns the required_source_files if stable_crate_hash is enabled (for span file encoding).
27822782fn with_encode_metadata_header (
27832783 tcx : TyCtxt < ' _ > ,
27842784 path : & Path ,
@@ -2832,8 +2832,12 @@ fn with_encode_metadata_header(
28322832 tcx. dcx ( ) . emit_fatal ( FailWriteFile { path : ecx. opaque . path ( ) , err } ) ;
28332833 }
28342834
2835- // Return required_source_files if separate_spans is enabled (for span file encoding)
2836- if tcx. sess . opts . unstable_opts . separate_spans { ecx. required_source_files . take ( ) } else { None }
2835+ // Return required_source_files if stable_crate_hash is enabled (for span file encoding)
2836+ if tcx. sess . opts . unstable_opts . stable_crate_hash {
2837+ ecx. required_source_files . take ( )
2838+ } else {
2839+ None
2840+ }
28372841}
28382842
28392843fn with_encode_span_header (
0 commit comments