Skip to content

Need to keep up with std::ascii reform #16

Closed
@akosthekiss

Description

@akosthekiss

When building cargo with (very) recent rustc, then errors like below are reported:

/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/glob-0.1.1/src/lib.rs:532:39: 532:49 error: type `char` does not implement any method in scope named `to_ascii`
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/glob-0.1.1/src/lib.rs:532                     let start = start.to_ascii().to_lowercase();
                                                                                                                            ^~~~~~~~~~
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/glob-0.1.1/src/lib.rs:533:35: 533:45 error: type `char` does not implement any method in scope named `to_ascii`
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/glob-0.1.1/src/lib.rs:533                     let end = end.to_ascii().to_lowercase();
                                                                                                                        ^~~~~~~~~~
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/glob-0.1.1/src/lib.rs:543:35: 543:45 error: type `char` does not implement any method in scope named `to_ascii`
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/glob-0.1.1/src/lib.rs:543                         let c = c.to_ascii().to_lowercase().as_char();
                                                                                                                        ^~~~~~~~~~
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/glob-0.1.1/src/lib.rs:566:11: 566:21 error: type `char` does not implement any method in scope named `to_ascii`
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/glob-0.1.1/src/lib.rs:566         a.to_ascii().to_lowercase() == b.to_ascii().to_lowercase()
                                                                                                ^~~~~~~~~~
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/glob-0.1.1/src/lib.rs:566:42: 566:52 error: type `char` does not implement any method in scope named `to_ascii`
/home/akiss/.cargo/registry/src/github.com-1ecc6299db9ec823/glob-0.1.1/src/lib.rs:566         a.to_ascii().to_lowercase() == b.to_ascii().to_lowercase()
                                                                                                                               ^~~~~~~~~~

This seems to be the case since rust-lang/rust@070ab63 , and the cause of the error is also present in current HEAD of glob.

(This is very similar to alexcrichton/curl-rust#45 and dtolnay/semver#27 )

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