The following program
fnmain(){
do "somestr".each_char |_| {false}}Gives this error:
treegrep.rs:2:39: 2:40 error: multiple applicable methods in scope
treegrep.rs:2 do "somestr".each_char |_| { false }
^
treegrep.rs:2:39: 2:40 note: candidate #1 is `core::io::__extensions__::each_char`
treegrep.rs:2 do "somestr".each_char |_| { false }
^
treegrep.rs:2:39: 2:40 note: candidate #2 is `core::str::__extensions__::each_char`
treegrep.rs:2 do "somestr".each_char |_| { false }
^
treegrep.rs:2:39: 2:40 error: failed to find an implementation of trait core::io::Reader for &'static str
treegrep.rs:2 do "somestr".each_char |_| { false }
^
It seems this significantly reduces the utility of each_char. Interestingly the last error (failed to find an implementation...) only shows up about half the time.
I'm not entirely sure how &str implements ReaderUtil.
The following program
Gives this error:
It seems this significantly reduces the utility of each_char. Interestingly the last error (
failed to find an implementation...) only shows up about half the time.I'm not entirely sure how &str implements ReaderUtil.