```
fn lowercase(s: &str) -> ~str {
  s.chars().map(|c| c.to_lowercase()).collect()
}
```
works on master. If 0.10 didn't support this type inference you can use ```collect::<~str>()``` to give it a hint.
Note that you can also write it
```
fn lowercase(s: &str) -> ~str {
  s.chars().map(std::char::to_lowercase()).collect::<~str>()
}
```
Not sure which version is more elegant.