Skip to content
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

rustdoc: Remove item types from some title pages #35003

Closed
wants to merge 1 commit into from

Conversation

ollie27
Copy link
Member

@ollie27 ollie27 commented Jul 24, 2016

On most pages like structs the title does not need to include
the word "Struct" because you can tell that from the definition.

Previous discussion: #34345

On most pages like structs the title does not need to include
the word "Struct" because you can tell that from the definition.
@rust-highfive
Copy link
Collaborator

r? @steveklabnik

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

@GuillaumeGomez
Copy link
Member

I actually like to know directly what the type is. So I'm against this change, sorry.

@steveklabnik
Copy link
Member

/cc @rust-lang/tools what do you think of this?

@nrc
Copy link
Member

nrc commented Jul 25, 2016

I feel pretty neutral. I kind of like having some description in the title - makes it a little easier to read, for me. And I usually skip reading the code snippet entirely (I wish they were hidden by default in fact). OTOH, it does make the title less cluttered.

@alexcrichton
Copy link
Member

cc @jonathandturner, @peschkaj

@brson
Copy link
Contributor

brson commented Jul 25, 2016

It's a tough call. Recall that the original intent is to fix inconsistencies. Today some pages have item types in their titles some don't. So this is creating more consistency (by removing them everywhere they are redundant with the subsequent type definition).

That said, I somewhat agree with @nrc that (in many cases at least) printing the complete type definition is just noise. Particularly on traits, where all the methods are immediately restated by the docs (this is really horrible) and on macros, where the definition just looks like gibberish and doesn't explain much.

So maybe it would be better to go in the direction of the original PR and add item types to all pages, and remove the type definitions. Not sure.

@GuillaumeGomez If your concern is knowing what the item type is, that is covered by this PR - it only removes that information where it is redundant.

@GuillaumeGomez
Copy link
Member

@brson: That's not what it seemed to look like but if everyone wants this merge, then let's get it.

@ollie27
Copy link
Member Author

ollie27 commented Aug 13, 2016

Well I don't really know what to do here. I personally still prefer #34345 as it's easier to read the type in the title and at least it keeps with the status quo. We can't really remove the definitions as they often contain information not available elsewhere on the page like generics.

@ollie27
Copy link
Member Author

ollie27 commented Aug 27, 2016

I'm closing this. Instead I've resubmitted #34345 as #36045. I'm sure we can do better but I think we should at least fix the inconsistency first.

@ollie27 ollie27 closed this Aug 27, 2016
Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 10, 2016
…bnik

rustdoc: Add missing item types to page titles

Most pages include the item type in the title such as "Struct std::vec::Vec". However it is missing from the pages for foreign functions, type definitions, macros, statics and constants. This adds them so for example, instead of a title of "std::u32::MAX" it is "Constant std::u32::MAX" to match the others.

[before](https://doc.rust-lang.org/nightly/std/u32/constant.MAX.html) [after](https://ollie27.github.io/rust_doc_test/std/u32/constant.MAX.html)
[before](https://doc.rust-lang.org/nightly/std/io/type.Result.html) [after](https://ollie27.github.io/rust_doc_test/std/io/type.Result.html)

Previous discussions: rust-lang#34345, rust-lang#35003
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 10, 2016
…bnik

rustdoc: Add missing item types to page titles

Most pages include the item type in the title such as "Struct std::vec::Vec". However it is missing from the pages for foreign functions, type definitions, macros, statics and constants. This adds them so for example, instead of a title of "std::u32::MAX" it is "Constant std::u32::MAX" to match the others.

[before](https://doc.rust-lang.org/nightly/std/u32/constant.MAX.html) [after](https://ollie27.github.io/rust_doc_test/std/u32/constant.MAX.html)
[before](https://doc.rust-lang.org/nightly/std/io/type.Result.html) [after](https://ollie27.github.io/rust_doc_test/std/io/type.Result.html)

Previous discussions: rust-lang#34345, rust-lang#35003
@ollie27 ollie27 deleted the rustdoc_titles2 branch September 13, 2016 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants