diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2014-03-03 10:12:40 -0800 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2014-03-04 18:04:16 -0800 |
| commit | 4a891fe80dfc5c64d72ddb842751bf410dc7a3a8 (patch) | |
| tree | 62ae6ffe732fe7f8374740632c59a31d4a542e52 /src/libsyntax/util | |
| parent | 0a5138c75244ffc0bc639d3060566e8efc83748e (diff) | |
Expand nested items within a backtrace.
Fixes a regression from #4913 which causes items to be exanded with spans lacking expn_info from the context's current backtrace.
Diffstat (limited to 'src/libsyntax/util')
| -rw-r--r-- | src/libsyntax/util/small_vector.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libsyntax/util/small_vector.rs b/src/libsyntax/util/small_vector.rs index 9eb9871bb21..f15b7dd5563 100644 --- a/src/libsyntax/util/small_vector.rs +++ b/src/libsyntax/util/small_vector.rs @@ -39,6 +39,14 @@ impl<T> FromIterator<T> for SmallVector<T> { } } +impl<T> Extendable<T> for SmallVector<T> { + fn extend<I: Iterator<T>>(&mut self, iter: &mut I) { + for val in *iter { + self.push(val); + } + } +} + impl<T> SmallVector<T> { pub fn zero() -> SmallVector<T> { Zero |
