summary refs log tree commit diff
path: root/src/librustdoc
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-12Auto merge of #40446 - arielb1:rollup, r=alexcrichtonbors-19/+47
Rollup of 12 pull requests - Successful merges: #40146, #40299, #40315, #40319, #40344, #40345, #40372, #40373, #40400, #40404, #40419, #40431 - Failed merges:
2017-03-11Auto merge of #40220 - jseyfried:ast_macro_def, r=nrcbors-4/+8
syntax: add `ast::ItemKind::MacroDef`, simplify hygiene info This PR - adds a new variant `MacroDef` to `ast::ItemKind` for `macro_rules!` and eventually `macro` items, - [breaking-change] forbids macro defs without a name (`macro_rules! { () => {} }` compiles today), - removes `ast::MacroDef`, and - no longer uses `Mark` and `Invocation` to identify and characterize macro definitions. - We used to apply (at least) two `Mark`s to an expanded identifier's `SyntaxContext` -- the definition mark(s) and the expansion mark(s). We now only apply the latter. r? @nrc
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-10Avoid using `Mark` and `Invocation` for macro defs.Jeffrey Seyfried-1/+1
2017-03-10Refactor out `ast::ItemKind::MacroDef`.Jeffrey Seyfried-4/+8
2017-03-10Fix associated consts displayGuillaume Gomez-19/+47
2017-03-09Clean up rustdoc cssGuillaume Gomez-58/+89
2017-03-08Rollup merge of #40293 - malbarbo:rustdoctest, r=alexcrichtonAriel Ben-Yehuda-2/+5
Remove extra space in test description (of a mod test)
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-03-06Remove extra space in test description (of a mod test)Marco A L Barbosa-2/+5
2017-03-04Add/remove `rerun-if-changed` when necessaryVadim Petrochenkov-1/+4
2017-03-03Integrate `TokenStream`.Jeffrey Seyfried-2/+4
2017-02-28Rollup merge of #39944 - GuillaumeGomez:associated-consts, r=frewsxcvCorey Farwell-55/+143
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-28Add `syntax::ext::tt::quoted::{TokenTree, ..}` and remove ↵Jeffrey Seyfried-2/+2
`tokenstream::TokenTree::Sequence`.
2017-02-28Rollup merge of #40057 - GuillaumeGomez:html-issue, r=frewsxcvCorey Farwell-4/+4
Fix nightly-only experimental API display Before: <img width="1440" alt="screen shot 2017-02-23 at 12 53 09" src="https://cloud.githubusercontent.com/assets/3050060/23258119/0c9cf6f2-f9c7-11e6-9989-15b4346dade0.png"> After: <img width="1440" alt="screen shot 2017-02-23 at 12 51 40" src="https://cloud.githubusercontent.com/assets/3050060/23258076/e6881118-f9c6-11e6-826c-442a73502b59.png"> r? @frewsxcv
2017-02-28Apply the same transformation to every typesGuillaume Gomez-38/+65
2017-02-26Put the const type and value into <code>Guillaume Gomez-27/+88
2017-02-26Improve associated constant rendering in rustdocGuillaume Gomez-6/+6
2017-02-25Fix nightly-only experimental API displayGuillaume Gomez-4/+4
2017-02-25rustc_typeck: rework coherence to be almost completely on-demand.Eduard-Mihai Burtescu-1/+2
2017-02-25rustc: combine BareFnTy and ClosureTy into FnSig.Eduard-Mihai Burtescu-24/+17
2017-02-25rustc_typeck: lift CrateCtxt to TyCtxt.Eduard Burtescu-8/+4
2017-02-25rustc: introduce a query system for type information in ty::maps.Eduard Burtescu-1/+1
2017-02-25rustc: consolidate dep-tracked hashmaps in tcx.maps.Eduard-Mihai Burtescu-1/+1
2017-02-25rustc: store type parameter defaults outside of ty::Generics.Eduard-Mihai Burtescu-3/+7
2017-02-25Rollup merge of #39953 - keeperofdakeys:macro-error, r=jseyfriedEduard-Mihai Burtescu-1/+1
Provide suggestions for unknown macros imported with `use` cc https://github.com/rust-lang/rust/issues/30197 r? @jseyfried
2017-02-23Move MacroKind into Def::MacroJosh Driver-1/+1
2017-02-16Set rustdoc --test files' path relative to the current directoryGuillaume Gomez-2/+10
2017-02-13Add filename when running rustdoc --test on a markdown fileGuillaume Gomez-3/+9
2017-02-12Rollup merge of #39743 - GuillaumeGomez:rustdoc-test-output, r=alexcrichtonGuillaume Gomez-2/+6
Add tested item in the rustdoc --test output r? @alexcrichton cc @SergioBenitez
2017-02-12Rollup merge of #39740 - jimmycuadra:rustdoc-empty-stability, r=aturonGuillaume Gomez-14/+27
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-11Use functional transformations on the option instead of matching.Jimmy Cuadra-16/+13
2017-02-11Add tested item in the rustdoc --test outputGuillaume Gomez-2/+6
2017-02-11Remove extra closing span element.Jimmy Cuadra-1/+0
2017-02-11rustdoc: Only include a stability span if needed.Jimmy Cuadra-15/+32
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-22/+29
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-22/+29
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-6/+0
These are all now no longer needed that we've only got rustbuild in tree.
2017-02-05make lifetimes that only appear in return type early-boundNiko Matsakis-1/+1
This is the full and proper fix for #32330. This also makes some effort to give a nice error message (as evidenced by the `ui` test), sending users over to the tracking issue for a full explanation.