Convert DefId to use DefIndex, which is an index into a list of
paths, and construct paths for all definitions. Also, stop rewriting DefIds for closures, and instead just load the closure data from the original def-id, which may be in another crate.
This commit is contained in:
parent
a6fee06741
commit
01f32ace03
40 changed files with 1125 additions and 783 deletions
|
@ -167,13 +167,13 @@ impl fmt::Display for Ident {
|
|||
|
||||
impl Encodable for Ident {
|
||||
fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error> {
|
||||
s.emit_str(&self.name.as_str())
|
||||
self.name.encode(s)
|
||||
}
|
||||
}
|
||||
|
||||
impl Decodable for Ident {
|
||||
fn decode<D: Decoder>(d: &mut D) -> Result<Ident, D::Error> {
|
||||
Ok(str_to_ident(&try!(d.read_str())[..]))
|
||||
Ok(Ident::with_empty_ctxt(try!(Name::decode(d))))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue