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:
parent
41bce91cb8
commit
5a8ba073bc
14 changed files with 87 additions and 75 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue