Skip to content

Commit 8fb8e6e

Browse files
committed
Add comments sugested by reviewer
1 parent 3d9eebc commit 8fb8e6e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

compiler/rustc_span/src/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1025,6 +1025,8 @@ rustc_index::newtype_index! {
10251025
pub struct AttrId {}
10261026
}
10271027

1028+
/// This trait is used to allow encoder specific encodings of certain types.
1029+
/// It is similar to rustc_type_ir's TyEncoder.
10281030
pub trait SpanEncoder: Encoder {
10291031
fn encode_span(&mut self, span: Span);
10301032
fn encode_symbol(&mut self, symbol: Symbol);
@@ -1117,6 +1119,9 @@ impl<E: SpanEncoder> Encodable<E> for AttrId {
11171119
// A fresh id will be generated when decoding
11181120
}
11191121
}
1122+
1123+
/// This trait is used to allow decoder specific encodings of certain types.
1124+
/// It is similar to rustc_type_ir's TyDecoder.
11201125
pub trait SpanDecoder: Decoder {
11211126
fn decode_span(&mut self) -> Span;
11221127
fn decode_symbol(&mut self) -> Symbol;

0 commit comments

Comments
 (0)