about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast_util.rs2
-rw-r--r--src/libsyntax/attr.rs2
-rw-r--r--src/libsyntax/ext/tt/transcribe.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/ast_util.rs b/src/libsyntax/ast_util.rs
index 680101e673c..ba683004aee 100644
--- a/src/libsyntax/ast_util.rs
+++ b/src/libsyntax/ast_util.rs
@@ -31,7 +31,7 @@ pub pure fn path_name_i(idents: &[ident], intr: @token::ident_interner)
 }
 
 
-pub pure fn path_to_ident(p: @path) -> ident { vec::last(p.idents) }
+pub pure fn path_to_ident(p: @path) -> ident { copy *p.idents.last() }
 
 pub pure fn local_def(id: node_id) -> def_id {
     ast::def_id { crate: local_crate, node: id }
diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs
index 7739a862432..fb7143f7c14 100644
--- a/src/libsyntax/attr.rs
+++ b/src/libsyntax/attr.rs
@@ -229,7 +229,7 @@ fn last_meta_item_by_name(items: &[@ast::meta_item], name: &str)
     -> Option<@ast::meta_item> {
 
     let items = attr::find_meta_items_by_name(items, name);
-    vec::last_opt(items)
+    items.last_opt().map(|item| **item)
 }
 
 pub fn last_meta_item_value_str_by_name(items: &[@ast::meta_item], name: &str)
diff --git a/src/libsyntax/ext/tt/transcribe.rs b/src/libsyntax/ext/tt/transcribe.rs
index 79264f7adf0..116ecc37d2e 100644
--- a/src/libsyntax/ext/tt/transcribe.rs
+++ b/src/libsyntax/ext/tt/transcribe.rs
@@ -167,7 +167,7 @@ pub fn tt_next_token(r: @mut TtReader) -> TokenAndSpan {
     while r.cur.idx >= r.cur.readme.len() {
         /* done with this set; pop or repeat? */
         if ! r.cur.dotdotdoted
-            || r.repeat_idx.last() == r.repeat_len.last() - 1 {
+            || { *r.repeat_idx.last() == *r.repeat_len.last() - 1 } {
 
             match r.cur.up {
               None => {