about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorEric Holk <eric.holk@gmail.com>2012-07-12 10:47:37 -0700
committerEric Holk <eric.holk@gmail.com>2012-07-12 18:16:00 -0700
commitaba665da32708017c2fcbe7f922eb087a8dbe3b1 (patch)
tree246042659a7c4c3d9a901a8ec84d0b96a9923569 /src/libstd
parent1a276dba52b5e717d12ab410832bdc13c28e9a67 (diff)
Fix the signature on vec::view.
Due to limitations in region inference, this has the effect of making vec::view pretty much entirely unusable.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/ebml.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstd/ebml.rs b/src/libstd/ebml.rs
index 395a411aeea..69a4920a4ae 100644
--- a/src/libstd/ebml.rs
+++ b/src/libstd/ebml.rs
@@ -122,8 +122,9 @@ fn tagged_docs(d: doc, tg: uint, it: fn(doc)) {
 
 fn doc_data(d: doc) -> ~[u8] { vec::slice::<u8>(*d.data, d.start, d.end) }
 
-fn with_doc_data<T>(d: doc, f: fn(x:&[u8]) -> T) -> T {
-    ret f(vec::view::<u8>(*d.data, d.start, d.end));
+fn with_doc_data<T>(d: doc, f: fn(x: &[u8]) -> T) -> T {
+    // FIXME (#2880): use vec::view once the region inferencer can handle it.
+    ret f(vec::slice::<u8>(*d.data, d.start, d.end));
 }
 
 fn doc_as_str(d: doc) -> str { ret str::from_bytes(doc_data(d)); }