Skip to content

Adjust reference to unidiomatic syntax in std docs roots #56544

Closed
@withoutboats

Description

@withoutboats

The opening section of the std documentation says this:

//! `std` is available to all Rust crates by default, just as if each one
//! contained an `extern crate std;` import at the [crate root]. Therefore the
//! standard library can be accessed in [`use`] statements through the path
//! `std`, as in [`use std::env`], or in expressions through the absolute path
//! `::std`, as in [`::std::env::args`].

This information, while accurate in both editions, is unidiomatic in the 2018 edition, in that it refers to extern crate syntax and double colon absolute paths. Perhaps this information could be reworded to be expressed in a more neutral way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsP-mediumMedium priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions