This code fails to compile:
use core::str::*;
fn main() {
let s = ~"hello";
// Works:
each_char(s, |_| {true});
// Fails:
s.each_char(|_| {true});
// Fails:
for s.each_char |_| {}
}
error: failed to find an implementation of trait core::io::Reader for <V2>
This code fails to compile:
error: failed to find an implementation of trait core::io::Reader for <V2>