8000 `[u8]::utf8_chunks` in std will conflict with the definition in `bstr` · Issue #181 · BurntSushi/bstr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[u8]::utf8_chunks in std will conflict with the definition in bstr #181
Open
@BurntSushi

Description

@BurntSushi

Note that it looks like [u8]::utf8_chunks will be getting stabilized in std soon (which is great): rust-lang/rust#99543

This will wind up conflicting with bstr's definition of the same routine. This is similar to the itertools situations where it's tricky to bring new iterator adapters into std from itertools because of the same style of conflict.

Code can be fixed I think by disambiguating via universal functional call syntax, but this can often lead to a lot of noise.

@dtolnay outlined a couple of concrete issues that might arise here: rust-lang/rust#99543 (comment)

The first issue is that std doesn't have an incomplete method. It seems reasonable to add one, so I think someone just needs to open an ACP for that.

The second issue occurs when someone is specifically using, e.g., bstr::Utf8Chunks somewhere and relying on [u8]::utf8_chunks to return that. I expect this to be a somewhat rare issue, and I'm not sure it warrants doing version sniffing to re-export core types. (And even if we did that, we would need Utf8Chunk::incomplete to exist.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0