diff options
| author | Michael Woerister <michaelwoerister@gmail> | 2013-09-11 11:08:44 +0200 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@gmail> | 2013-09-15 12:28:25 +0200 |
| commit | bf37de9fc675a90d12c37fd0e8acdfe4107545f9 (patch) | |
| tree | 86d3da6715392e8cfdb41c11f5eedf1f7dda899a /src/libsyntax | |
| parent | 4ecb0a372d4b246f694bf780d50809dc0fb32018 (diff) | |
| download | rust-bf37de9fc675a90d12c37fd0e8acdfe4107545f9.tar.gz rust-bf37de9fc675a90d12c37fd0e8acdfe4107545f9.zip | |
debuginfo: Basic support for trait objects.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ast_map.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libsyntax/ast_map.rs b/src/libsyntax/ast_map.rs index 8f620e8167b..1323db7acba 100644 --- a/src/libsyntax/ast_map.rs +++ b/src/libsyntax/ast_map.rs @@ -38,6 +38,16 @@ pub enum path_elt { path_pretty_name(Ident, u64), } +impl path_elt { + pub fn ident(&self) -> Ident { + match *self { + path_mod(ident) | + path_name(ident) | + path_pretty_name(ident, _) => ident + } + } +} + pub type path = ~[path_elt]; pub fn path_to_str_with_sep(p: &[path_elt], sep: &str, itr: @ident_interner) |
