about summary refs log tree commit diff
path: root/src/libsyntax/lib.rs
diff options
context:
space:
mode:
authorUlrik Sverdrup <root@localhost>2015-05-01 17:08:39 +0200
committerUlrik Sverdrup <root@localhost>2015-05-01 19:51:31 +0200
commitda03c9df33177d77029c52f8a68a5d214a6e83c7 (patch)
treeeca156ea8ad4fe9c6abd38fbb9032c13f0ddd080 /src/libsyntax/lib.rs
parentee48e6d192166be08a57dc4f5ba14256c072e9c3 (diff)
syntax: Avoid reallocating or copying in CodeMap::new_filemap
Avoid creating a new String when there is no BOM to strip, and
otherwises use .drain(..3) to strip the BOM using the same allocation.
Diffstat (limited to 'src/libsyntax/lib.rs')
-rw-r--r--src/libsyntax/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs
index 275400009f5..330fe86deeb 100644
--- a/src/libsyntax/lib.rs
+++ b/src/libsyntax/lib.rs
@@ -27,6 +27,7 @@
 
 #![feature(associated_consts)]
 #![feature(collections)]
+#![feature(collections_drain)]
 #![feature(core)]
 #![feature(libc)]
 #![feature(rustc_private)]