-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
doc: there is no case that is shown, so something was likely missing … #31762
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
I am confused. It's showing what the value of this constant should be, given that we run the builders on this particular platform. |
Where is it shown that we are running on |
That's the idea with these. They're demonstrating the value this constant will have. |
But the constant depends on what platform was used to build the code, right? |
That's why it's "in this case". When these docs were built. |
I don't get it. There needs to be more explanation than just "in this case". More importantly, how is that info even important... why would we telling readers that the docs were built on |
Yeah, I didn't close it, because if its confusing, we should improve it. These are string constants. This is intended to be showing the example value of said constant. On Feb 18, 2016, 16:35 -0500, Tshepang Lekhonkhobenotifications@github.com, wrote:
|
@steveklabnik If I understand @tshepang correctly, this link shows it in context: I think what @tshepang is saying is that when you look at the docs, it doesn't make sense to say |
@MatejLach understands me |
Yes. This existing text was a compromise; there's no way to directly insert it, so I put in the example from the way that the docs will be displayed officially. |
@steveklabnik Just to make sure, you're saying that you inserted the |
Because the builder that builds the docs is running on a Linux box. On Feb 18, 2016, 18:55 -0500, Matej Ľachnotifications@github.com, wrote:
|
For what it's worth, I think the text
is confusing since it's not immediately obvious what "this" is referring to. In my opinion, I don't think the existence of that sentence adds much value. |
@@ -618,7 +618,7 @@ pub mod consts { | |||
#[stable(feature = "env", since = "1.0.0")] | |||
pub const ARCH: &'static str = super::arch::ARCH; | |||
|
|||
/// The family of the operating system. In this case, `unix`. | |||
/// The family of the operating system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
of the operating system in use
That would align this with the doc comment below, and then it's clear to which operating system
this actually refers to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding "in use" is an improvement, thanks.
These items / doc-comments are never cfg'd out, so it seems like if one were to build windows documentation the docs would still show I think the listed possible values are clear enough. |
@mitaa yes, that's what I meant by
|
@steveklabnik have you seen this page https://doc.rust-lang.org/nightly/std/env/consts? |
Yes, I have. |
So, to be clear, what I want to see in an improvement here is to make sure that we have examples of what this constants look like. This was how I did it; other ways are welcome. I don't want to remove the example, though. |
There is no example in that page. What example are you referring to? |
These are constants. This is an example showing the value of said constants. |
You are talking about an example as if it exists...
|
The example is the text you are trying to remove in this PR. |
@tshepang I think you're misunderstanding what @steveklabnik means by an example in this case. |
There's a list of examples under the "Some possible values:" header. Is that not enough? |
They should be enough, but they don't render here. Maybe a bug in rustdoc? |
No, thats actually intentional. On module pages only short summaries are shown. |
Wow, wasn't even aware those are click-able. Well, that makes the case for this change even stronger, don't you think @steveklabnik? |
I agree with @steveklabnik that providing an example value in the short summary is convenient, but I also think that @MatejLach is right: the wording Also, |
@tshepang sorry, I did not see this since @aturon was the reviewer, not me. Let's fix that:
Yes, this is what I'd like to see.
Yes, though I'm guessing the examples would move into the body, rather than be a summary. |
PR updated |
@bors: r+ rollup |
📌 Commit 8f463ea has been approved by |
doc: there is no case that is shown, so something was likely missing … …from the change
doc: there is no case that is shown, so something was likely missing … …from the change
doc: there is no case that is shown, so something was likely missing … …from the change
doc: there is no case that is shown, so something was likely missing … …from the change
…from the change