Skip to content

Commit b7dc934

Browse files
committed
Wrap some long comment lines.
1 parent 432abd8 commit b7dc934

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

compiler/rustc_metadata/src/rmeta/encoder.rs

+9-10
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,10 @@ impl<'a, 'tcx> Encodable<EncodeContext<'a, 'tcx>> for Span {
261261
// This allows us to avoid loading the dependencies of proc-macro crates: all of
262262
// the information we need to decode `Span`s is stored in the proc-macro crate.
263263
let (tag, metadata_index) = if source_file.is_imported() && !s.is_proc_macro {
264-
// To simplify deserialization, we 'rebase' this span onto the crate it originally came from
265-
// (the crate that 'owns' the file it references. These rebased 'lo' and 'hi' values
266-
// are relative to the source map information for the 'foreign' crate whose CrateNum
267-
// we write into the metadata. This allows `imported_source_files` to binary
264+
// To simplify deserialization, we 'rebase' this span onto the crate it originally came
265+
// from (the crate that 'owns' the file it references. These rebased 'lo' and 'hi'
266+
// values are relative to the source map information for the 'foreign' crate whose
267+
// CrateNum we write into the metadata. This allows `imported_source_files` to binary
268268
// search through the 'foreign' crate's source map information, using the
269269
// deserialized 'lo' and 'hi' values directly.
270270
//
@@ -672,12 +672,11 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
672672
let exported_symbols_bytes = self.position() - i;
673673

674674
// Encode the hygiene data,
675-
// IMPORTANT: this *must* be the last thing that we encode (other than `SourceMap`). The process
676-
// of encoding other items (e.g. `optimized_mir`) may cause us to load
677-
// data from the incremental cache. If this causes us to deserialize a `Span`,
678-
// then we may load additional `SyntaxContext`s into the global `HygieneData`.
679-
// Therefore, we need to encode the hygiene data last to ensure that we encode
680-
// any `SyntaxContext`s that might be used.
675+
// IMPORTANT: this *must* be the last thing that we encode (other than `SourceMap`). The
676+
// process of encoding other items (e.g. `optimized_mir`) may cause us to load data from
677+
// the incremental cache. If this causes us to deserialize a `Span`, then we may load
678+
// additional `SyntaxContext`s into the global `HygieneData`. Therefore, we need to encode
679+
// the hygiene data last to ensure that we encode any `SyntaxContext`s that might be used.
681680
i = self.position();
682681
let (syntax_contexts, expn_data, expn_hashes) = self.encode_hygiene();
683682
let hygiene_bytes = self.position() - i;

0 commit comments

Comments
 (0)