auto merge of #5404 : bstrie/rust/decopy, r=pcwalton
Also turn `copy` into `.clone()` in much of run-pass.
This commit is contained in:
commit
6f1e8ef71a
46 changed files with 115 additions and 86 deletions
|
@ -20,6 +20,7 @@
|
|||
use at_vec;
|
||||
use cast;
|
||||
use char;
|
||||
use clone::Clone;
|
||||
use cmp::{Equiv, TotalOrd, Ordering, Less, Equal, Greater};
|
||||
use libc;
|
||||
use option::{None, Option, Some};
|
||||
|
@ -2436,6 +2437,13 @@ impl OwnedStr for ~str {
|
|||
}
|
||||
}
|
||||
|
||||
impl Clone for ~str {
|
||||
#[inline(always)]
|
||||
fn clone(&self) -> ~str {
|
||||
self.to_str() // hilarious
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use char;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue