1
Fork 0

Make to_str pure and fix const parameters for str-mutating functions

Two separate changes that got intertwined (sorry):

Make to_str pure. Closes #3691

In str, change functions like push_char to take an &mut str instead of
an &str. Closes #3710
This commit is contained in:
Tim Chevalier 2012-10-11 14:12:50 -07:00
parent 41bce91cb8
commit 5a8ba073bc
14 changed files with 87 additions and 75 deletions

View file

@ -45,7 +45,7 @@ fn cat(in_x : uint, in_y : int, in_name: ~str) -> cat {
}
impl cat: ToStr {
fn to_str() -> ~str { self.name }
pure fn to_str() -> ~str { self.name }
}
fn print_out<T: ToStr>(thing: T, expected: ~str) {