Add comments sugested by reviewer
This commit is contained in:
parent
3d9eebc21f
commit
8fb8e6eefb
1 changed files with 5 additions and 0 deletions
|
@ -1025,6 +1025,8 @@ rustc_index::newtype_index! {
|
||||||
pub struct AttrId {}
|
pub struct AttrId {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// This trait is used to allow encoder specific encodings of certain types.
|
||||||
|
/// It is similar to rustc_type_ir's TyEncoder.
|
||||||
pub trait SpanEncoder: Encoder {
|
pub trait SpanEncoder: Encoder {
|
||||||
fn encode_span(&mut self, span: Span);
|
fn encode_span(&mut self, span: Span);
|
||||||
fn encode_symbol(&mut self, symbol: Symbol);
|
fn encode_symbol(&mut self, symbol: Symbol);
|
||||||
|
@ -1117,6 +1119,9 @@ impl<E: SpanEncoder> Encodable<E> for AttrId {
|
||||||
// A fresh id will be generated when decoding
|
// A fresh id will be generated when decoding
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// This trait is used to allow decoder specific encodings of certain types.
|
||||||
|
/// It is similar to rustc_type_ir's TyDecoder.
|
||||||
pub trait SpanDecoder: Decoder {
|
pub trait SpanDecoder: Decoder {
|
||||||
fn decode_span(&mut self) -> Span;
|
fn decode_span(&mut self) -> Span;
|
||||||
fn decode_symbol(&mut self) -> Symbol;
|
fn decode_symbol(&mut self) -> Symbol;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue