Skip to content

Seemingly incorrect info about path clarity #139

Closed
@brson

Description

@brson

In "2018-specific changes":

  • "use declarations must begin with ... an external crate name"

This does not seem to be true - paths like "use foo::bar" will resolve a "foo" in local scope, not just a crate name.

  • "to catch possible ambiguities with uniform paths (which is planned for inclusion soon #55618)."

That issue is closed and presumably in stable?

In "Path clarity":

  • "Absolute paths begin with a crate name, where the keyword crate refers to the current crate."

It's not clear what "absolute paths" means. Is this for "::"? It should be explicit.

Again on this page I don't see mention of unprefixed paths resolving names in local scope, which they do.

  • "In Rust 2018, paths in use declarations must begin with a crate name, crate, self, or super"

Again, 'use' declarations seem to resolve names in local scope. No mention of "::" here.

All of the above applies with or with out the 'uniform_paths' feature.

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