diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2015-09-17 14:29:59 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2015-10-01 10:43:07 -0400 |
| commit | 01f32ace0302373fb69ef9e2d0e21cc841981eba (patch) | |
| tree | aceffa99e137cb0fa21d75f1a973ab0528a21415 /src/libsyntax | |
| parent | a6fee0674171fefc25e1a61e01870a654d6862a8 (diff) | |
| download | rust-01f32ace0302373fb69ef9e2d0e21cc841981eba.tar.gz rust-01f32ace0302373fb69ef9e2d0e21cc841981eba.zip | |
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.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index 45e1d005863..d186918f44a 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -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)))) } } |
