summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2017-04-01Make the rustdoc sidebar white on `src` pagesWesley Wiser-6/+10
Fixes #40724
2017-03-13Auto merge of #40451 - ollie27:rustdoc_impls_js_escape, r=GuillaumeGomezbors-1/+1
rustdoc: Fix string escaping in implementors js files The generated HTML can contain quotes so we need to make sure they are escaped before inserting into the js files.
2017-03-12rustdoc: Fix string escaping in implementors js filesOliver Middleton-1/+1
The generates HTML can contain quotes so we need to make sure they are escaped before inserting into the js files.
2017-03-11Rollup merge of #40419 - GuillaumeGomez:fix-const-rendering, r=frewsxcvAriel Ben-Yehuda-19/+47
Fix associated consts display Fixes #40370. r? @frewsxcv
2017-03-10Fix associated consts displayGuillaume Gomez-19/+47
2017-03-09Clean up rustdoc cssGuillaume Gomez-58/+89
2017-03-06Improve the style of the sidebar in rustdoc outputWesley Wiser-2/+20
Makes the sidebar a light grey and highlights the currently viewed item in the sidebar more prominently. All visual design credit goes to @johnwhelchel (#37856)
2017-02-28Rollup merge of #39944 - GuillaumeGomez:associated-consts, r=frewsxcvCorey Farwell-54/+142
Improve associated constant rendering in rustdoc Before: <img width="1440" alt="screen shot 2017-02-19 at 00 30 51" src="https://cloud.githubusercontent.com/assets/3050060/23097697/caeed80e-f63a-11e6-98c2-5d27e4efd76d.png"> After: <img width="1440" alt="screen shot 2017-02-19 at 00 30 39" src="https://cloud.githubusercontent.com/assets/3050060/23097698/cfb4874e-f63a-11e6-80cf-ffbf5c5c6162.png"> cc @SergioBenitez r? @rust-lang/docs
2017-02-28Remove `Token::MatchNt`.Jeffrey Seyfried-1/+1
2017-02-28Apply the same transformation to every typesGuillaume Gomez-38/+65
2017-02-26Put the const type and value into <code>Guillaume Gomez-26/+87
2017-02-26Improve associated constant rendering in rustdocGuillaume Gomez-6/+6
2017-02-25Fix nightly-only experimental API displayGuillaume Gomez-4/+4
2017-02-12Rollup merge of #39740 - jimmycuadra:rustdoc-empty-stability, r=aturonGuillaume Gomez-5/+11
rustdoc: Only include a stability span if needed. This patch gets rid of the empty stability boxes in docs by only including the span that creates it when the item actually has a stability class. Here are images of the issue on `std::process::Output`: Before: <img width="340" alt="before" src="https://cloud.githubusercontent.com/assets/122457/22853638/ff88d1b2-f010-11e6-90d6-bf3d10e2fffa.png"> After: <img width="333" alt="after" src="https://cloud.githubusercontent.com/assets/122457/22853639/06bfe7cc-f011-11e6-9892-f0ea2cc6ec90.png"> This is my first non-trivial patch to Rust, so I'm sure some of my approach is not idiomatic. Let me know how you'd like me to adjust!
2017-02-12Rollup merge of #39697 - notriddle:rustdoc_tooltip, r=GuillaumeGomezGuillaume Gomez-3/+4
Add the item type to the tooltip See: https://users.rust-lang.org/t/seeking-opinions-from-colorblind-rustaceans-coloring-in-rustdoc-code-blocks
2017-02-12Rollup merge of #39654 - ollie27:rustdoc_attributes, r=GuillaumeGomezGuillaume Gomez-5/+15
rustdoc: Show attributes on all item types Currently attributes are only shown for structs, unions and enums but they should be shown for all items. For example it is useful to know if a function is `#[no_mangle]`.
2017-02-11Remove extra closing span element.Jimmy Cuadra-1/+0
2017-02-11rustdoc: Only include a stability span if needed.Jimmy Cuadra-5/+12
2017-02-09Add the short type to inline links, tooMichael Howell-2/+2
2017-02-09Add the item type to the tooltipMichael Howell-1/+2
See: https://users.rust-lang.org/t/seeking-opinions-from-colorblind-rustaceans-coloring-in-rustdoc-code-blocks
2017-02-08Rollup merge of #39589 - ollie27:rustdoc_impl_disambiguation, r=alexcrichtonCorey Farwell-11/+27
rustdoc: Improve impl disambiguation * Don't disambiguate if there are multiple impls for the same type. * Disambiguate for impls of &Foo and &mut Foo. * Don't try to disambiguate generic types. [before](https://doc.rust-lang.org/nightly/std/ops/trait.Rem.html#implementors) [after](https://ollie27.github.io/rust_doc_test/std/ops/trait.Rem.html#implementors)
2017-02-08rustdoc: Show attributes on all item typesOliver Middleton-5/+15
Currently attributes are only shown for structs, unions and enums but they should be shown for all items. For example it is useful to know if a function is `#[no_mangle]`.
2017-02-08Rollup merge of #39597 - GuillaumeGomez:correct_rustdoc_test_file, ↵Corey Farwell-3/+5
r=alexcrichton Display correct filename with --test option Fixes #39592. With the current files: ```rust pub mod foo; /// This is a Foo; /// /// ``` /// println!("baaaaaar"); /// ``` pub struct Foo; /// This is a Bar; /// /// ``` /// println!("fooooo"); /// ``` pub struct Bar; ``` ```rust // note the whitespaces /// ``` /// println!("foo"); /// ``` pub fn foo() {} ``` It displays: ``` ./build/x86_64-apple-darwin/stage1/bin/rustdoc --test test.rs running 3 tests test test.rs - line 13 ... ok test test.rs - line 5 ... ok test foo.rs - line 2 ... ok test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured ``` ``` ` `` println!("lol"); ` `` asdjnfasd asd ``` It displays: ``` ./build/x86_64-apple-darwin/stage1/bin/rustdoc --test foo.md running 1 test test <input> - line 3 ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured ``` r? @alexcrichton
2017-02-06Display correct filename with --test optionGuillaume Gomez-3/+5
2017-02-06rustdoc: Improve impl disambiguationOliver Middleton-11/+27
* Don't disambiguate if there are multiple impls for the same type. * Disambiguate for impls of &Foo and &mut Foo. * Don't try to disambiguate generic types.
2017-02-06std: Remove cfg(cargobuild) annotationsAlex Crichton-5/+0
These are all now no longer needed that we've only got rustbuild in tree.
2017-02-03Switch logic to Span instead of HashMapGuillaume Gomez-3/+5
2017-02-03Move to my own hoedown repositoryGuillaume Gomez-17/+28
2017-02-03Add information in case of markdown block code test failureggomez-1/+6
2017-02-02Rollup merge of #39416 - tspiteri:ffi-unsafe-icon, r=brsonGuillaume Gomez-5/+6
rustdoc: mark FFI functions with unsafety icon Currently, in the list of functions, unsafe functions are marked with a superscript ⚠, but unsafe FFI functions are not. This patch treats unsafe FFI functions like other unsafe functions in this regard.
2017-01-31rustdoc: mark ffi functions with unsafety iconTrevor Spiteri-5/+6
2017-01-29Remove no longer necessary ctor checks in rustc_privacyVadim Petrochenkov-2/+0
2017-01-27Don't generate doc if doc comments only filled with 'white' charactersGuillaume Gomez-1/+2
2017-01-21Force backline on all where in docsGuillaume Gomez-4/+3
2017-01-20Rollup merge of #39118 - jseyfried:token_tree_based_parser, r=nrcAlex Crichton-9/+7
Refactor the parser to consume token trees This is groundwork for efficiently parsing attribute proc macro invocations, bang macro invocations, and `TokenStream`-based attributes and fragment matchers. This improves parsing performance by 8-15% and expansion performance by 0-5% on a sampling of the compiler's crates. r? @nrc
2017-01-17Fix fallout in `rustdoc`.Jeffrey Seyfried-9/+7
2017-01-17AST/HIR: Merge ObjectSum and PolyTraitRefVadim Petrochenkov-13/+0
2017-01-15Fix missing blank space issueGuillaume Gomez-2/+4
2017-01-12Auto merge of #38569 - chris-morgan:rustdoc-highlight-kw-2, r=steveklabnikbors-3/+5
Fix rustdoc highlighting of `&` and `*` Whitespace tokens were included, so the span check used with `&` was incorrect, and it was never highlighted as kw-2 (RefKeyword). The `*` in `*foo` and `*const T` should also be highlighted kw-2, so I added them. Note that this *will* cause mishighlighting of code like `1*2`, but that should have been written `1 * 2`. Same deal with `1&2`.
2017-01-09Improved rustdoc rendering for unstable featuresManish Goregaokar-11/+26
2017-01-09Auto merge of #38244 - estebank:escape-reason-docs, r=ollie27bors-9/+36
rustdoc: escape the deprecated and unstable reason text Fix #38220. Instead of the [current output](https://doc.rust-lang.org/std/boxed/trait.FnBox.html): <img width="967" alt="incorrect unescaped unstable reason in docs" src="https://cloud.githubusercontent.com/assets/1606434/21021898/73121d42-bd2f-11e6-8076-8a5127dbc010.png"> display: <img width="979" alt="escaped unstable reason in docs" src="https://cloud.githubusercontent.com/assets/1606434/21021876/52eb0f88-bd2f-11e6-9088-58bdc7d92328.png">
2017-01-04Auto merge of #38414 - estebank:doc-dissambiguate, r=steveklabnikbors-166/+201
Rustdoc: disambiguate Implementors when the type name is not unique Presentation [goes from](https://doc.rust-lang.org/stable/std/iter/trait.ExactSizeIterator.html#implementors): <img width="492" alt="" src="https://cloud.githubusercontent.com/assets/1606434/21276752/b2b50474-c387-11e6-96e1-9766851da269.png"> to: <img width="787" alt="" src="https://cloud.githubusercontent.com/assets/1606434/21276763/bb37f6b0-c387-11e6-8596-9163cb254674.png"> on cases where there're multiple implementors with the same name. Fixes #37762.
2016-12-29rustdoc: Fix broken CSS for trait itemsOliver Middleton-2/+1
2016-12-27Merge branch 'master' into escape-reason-docsEsteban Küber-39/+37
2016-12-27Auto merge of #38329 - ollie27:rustdoc_stab_em_div, r=steveklabnikbors-15/+16
rustdoc: Fix invalid HTML in stability notices `em` tags cannot contain `p` tags so use `div`s instead of `em`s as the Markdown will create `p` tags.
2016-12-25Add unittestEsteban Küber-1/+12
2016-12-24Rollup merge of #38497 - QuietMisdreavus:rustdoc-where-again, r=steveklabnikSteve Klabnik-1/+1
rustdoc: properly calculate line length for where clauses Apparently, while I was cleaning up #37190, I regressed the formatting for long where clauses, where it wouldn't take the "prefix" length into account when deciding whether to break the line up. This patch fixes that.
2016-12-24Rollup merge of #38480 - clarcharr:import_css, r=steveklabnikSteve Klabnik-2/+1
Don't @import normalize.css. This lets the browser load both files in parallel instead of waiting for `rustdoc.css` to load first.
2016-12-22use same param name across methodsEsteban Küber-9/+12
2016-12-23Fix rustdoc highlighting of `&` and `*`.Chris Morgan-3/+5
Whitespace tokens were included, so the span check used with `&` was incorrect, and it was never highlighted as kw-2. The `*` in `*foo` and `*const T` should also be highlighted kw-2, so I added them. Note that this *will* cause mishighlighting of code like `1*2`, but that should have been written `1 * 2`. Same deal with `1&2`.