diff options
| author | James Sanderson <zofrex@gmail.com> | 2018-04-15 20:51:10 +0100 |
|---|---|---|
| committer | James Sanderson <zofrex@gmail.com> | 2018-04-15 20:51:10 +0100 |
| commit | 4ae9488ce8fc89d1ddaa70ac148b8d66c311e517 (patch) | |
| tree | c1ebc68e7f0af0a04471ae36aeca0ec402938e17 /src/libsyntax_pos | |
| parent | 21dae950bebab7376d2bcb92299861e6cd05299d (diff) | |
Provide better names for builtin deriving-generated attributes
Diffstat (limited to 'src/libsyntax_pos')
| -rw-r--r-- | src/libsyntax_pos/symbol.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax_pos/symbol.rs b/src/libsyntax_pos/symbol.rs index 331b0fe5481..d1a5c792b9e 100644 --- a/src/libsyntax_pos/symbol.rs +++ b/src/libsyntax_pos/symbol.rs @@ -53,6 +53,10 @@ impl Ident { pub fn modern(self) -> Ident { Ident::new(self.name, self.span.modern()) } + + pub fn gensym(self) -> Ident { + Ident::new(self.name.gensymed(), self.span) + } } impl PartialEq for Ident { |
