libsyntax: add some explicit copies

This commit is contained in:
Erick Tryzelaar
2013-02-24 18:32:02 -08:00
parent 752befe2a6
commit bff22cf166
8 changed files with 94 additions and 68 deletions

View File

@@ -27,7 +27,7 @@ use core::vec;
pub pure fn path_name_i(idents: &[ident], intr: @token::ident_interner)
-> ~str {
// FIXME: Bad copies (#2543 -- same for everything else that says "bad")
str::connect(idents.map(|i| *intr.get(*i)), ~"::")
str::connect(idents.map(|i| copy *intr.get(*i)), ~"::")
}
@@ -283,7 +283,7 @@ pub fn split_trait_methods(trait_methods: &[trait_method])
let mut reqd = ~[], provd = ~[];
for trait_methods.each |trt_method| {
match *trt_method {
required(ref tm) => reqd.push((*tm)),
required(ref tm) => reqd.push(copy *tm),
provided(m) => provd.push(m)
}
};