Skip to content

Improve std::path::Path::join documentation when path is overridden #146447

Description

@PitiBouchon

On Windows, when running

path.join("C:")

the path get overridden, which is a strange behavior because Path::new("C:").is_relative() is true.

And https://doc.rust-lang.org/std/path/struct.Path.html#method.join is telling :

If path is absolute, it replaces the current path

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions