Closed
Description
use std::bool::* ;
use std::iter::* ;
use std::str::* ;
use std::util::* ;
fn main(){
let mut myStr = ~"rust";
myStr = replace(myStr, "t", "ty");
println!("{}", myStr);
println!("{}", id(10));
}
Error :
type_check_rust.rs:9:9: 9:35 error: this function takes 2 parameters but 3 parameters were supplied
type_check_rust.rs:9 myStr = replace(myStr, "t", "ty");
^~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
but if I import the str module after util then prints result as expected:
rusty
10
Platform: Ubuntu 12.04
Metadata
Metadata
Assignees
Labels
No labels