diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2015-01-01 14:53:20 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2015-01-02 12:19:59 -0500 |
| commit | 64b7c22c46b204520a6fae1c5cd750a3d3c6a66a (patch) | |
| tree | 6e9a504759c5ac42f747c5739b4173d6646cd8c8 /src/libsyntax/util | |
| parent | d55577255434d1a9969b74cc4ac5dff4c04d6054 (diff) | |
| download | rust-64b7c22c46b204520a6fae1c5cd750a3d3c6a66a.tar.gz rust-64b7c22c46b204520a6fae1c5cd750a3d3c6a66a.zip | |
core: use assoc types in `Deref[Mut]`
Diffstat (limited to 'src/libsyntax/util')
| -rw-r--r-- | src/libsyntax/util/interner.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs index 97eb4316583..5dde8db6155 100644 --- a/src/libsyntax/util/interner.rs +++ b/src/libsyntax/util/interner.rs @@ -124,7 +124,9 @@ impl BorrowFrom<RcStr> for str { } } -impl Deref<str> for RcStr { +impl Deref for RcStr { + type Target = str; + fn deref(&self) -> &str { self.string[] } } |
