Skip to content

each_char conflict in str::StrSlice and io::ReaderUtil #5664

Closed
@sbillig

Description

@sbillig

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions