New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update std/lib.rs docs to reflect Rust 2018 usage #57179

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
7 participants
@Xaeroxe
Copy link
Contributor

Xaeroxe commented Dec 28, 2018

Fixes #56544

This paragraph was written for Rust 2015. Since 2018 has been stable for a while I think we can update it.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Dec 28, 2018

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@varkor

This comment has been minimized.

Copy link
Member

varkor commented Dec 28, 2018

Rust 2018 doesn't replace Rust 2015: I think it'd be better here to explicitly note the differences between the 2015 and 2018 editions. (There might already be a docs convention for this; I'm not sure.)

@Xaeroxe

This comment has been minimized.

Copy link
Contributor

Xaeroxe commented Dec 28, 2018

People reading the std library for the first time are more likely to be using 2018 since that's the new default for cargo, however I'll defer to established standards if they exist.

@steveklabnik

This comment has been minimized.

Copy link
Member

steveklabnik commented Dec 28, 2018

This is great, thanks! This fixes #56544, any chance you could amend the commit message to say

Fixes #56544 

?

(There might already be a docs convention for this; I'm not sure.)

We haven't discussed it! Generally, we document things "in the present", so we'd default to Rust 2018. I'd be open to an exception here. @rust-lang/docs ?

@Xaeroxe

This comment has been minimized.

Copy link
Contributor

Xaeroxe commented Dec 28, 2018

Sure!

@QuietMisdreavus

This comment has been minimized.

Copy link
Member

QuietMisdreavus commented Dec 30, 2018

I feel like we should leave in the mention of absolute paths, since they're still a thing in 2015 (unless i'm wrong here?). Otherwise, since 2018 is going to be what most people are writing about in the future, explaining things in terms of that perspective is probably going to be best.

Generally, we document things "in the present", so we'd default to Rust 2018.

+1 to this.

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Jan 2, 2019

@Dylan-DPC

This comment has been minimized.

Copy link
Member

Dylan-DPC commented Jan 21, 2019

ping from triage @QuietMisdreavus waiting for your review on this

//! 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 comment has been minimized.

@QuietMisdreavus

QuietMisdreavus Jan 21, 2019

Member

I don't actually know the full extent of the path changes that were introduced in Rust 2018; did absolute paths like this go away as well?

This comment has been minimized.

@Xaeroxe

Xaeroxe Jan 21, 2019

Contributor

They did yeah

@QuietMisdreavus

This comment has been minimized.

Copy link
Member

QuietMisdreavus commented Jan 21, 2019

Since you removed the link anchors for [crate root] and [`::std::env::args`], can you take those link targets out of the big group at the bottom of that doc comment? Might as well clean those up while we're here.

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