about summary refs log tree commit diff
path: root/src/librustdoc/html/format.rs
AgeCommit message (Collapse)AuthorLines
2019-03-22Rollup merge of #59170 - varkor:const-generics-rustdoc, r=QuietMisdreavus,eddybMazdak Farrokhzad-24/+23
Add const generics to rustdoc Split out from #53645. This work is a collaborative effort with @yodaldevoid. The `FIXME`s are waiting on a refactor to `LazyConst`. I'll address these in a follow up, but I thought it would be better to implement the rest now to avoid bitrot. r? @QuietMisdreavus
2019-03-18Make clean::Constant display respect f.alternate()varkor-1/+3
2019-03-18Fix indentation issuevarkor-1/+1
2019-03-18Refactor `GenericArgs` to include const genericsvarkor-14/+5
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-18Implement `Clean` for const genericsvarkor-0/+6
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-18Rename typarams to param_namesvarkor-10/+10
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-14Add default keyword handling in rustdocGuillaume Gomez-0/+11
2019-02-27Support defining C compatible variadic functionsDan Robertson-17/+5
Add support for defining C compatible variadic functions in unsafe rust with extern "C".
2019-02-23Transition librustdoc to 2018 editionHirokazu Hata-39/+40
2019-02-20Rollup merge of #58409 - euclio:impl-trait-wrapping, r=QuietMisdreavuskennytm-11/+15
rustdoc: respect alternate flag when formatting impl trait Fixes #58226. Before: <img width="963" alt="screen shot 2019-02-12 at 3 23 30 pm" src="https://user-images.githubusercontent.com/1372438/52665732-4496ea00-2eda-11e9-9e29-efffe43b2abf.png"> After: <img width="964" alt="screen shot 2019-02-12 at 3 23 51 pm" src="https://user-images.githubusercontent.com/1372438/52665733-452f8080-2eda-11e9-999a-dd1fb28dee16.png">
2019-02-15Add Const kind to rustdocvarkor-0/+10
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-3/+3
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-12respect alternate flag when formatting impl traitAndy Russell-11/+15
2019-02-10rustc: doc commentsAlexander Regueiro-3/+3
2019-02-06display sugared return types for async functionsAndy Russell-7/+16
2018-12-25Remove licensesMark Rousskov-10/+0
2018-10-15rustdoc: Use dyn keyword when rendering dynamic traitsOliver Middleton-0/+3
The dyn keyword has been stable for a while now so rustdoc should start using it.
2018-08-23use String::new() instead of String::from(""), "".to_string(), "".to_owned() ↵Matthias Krüger-1/+1
or "".into()
2018-07-29Auto merge of #52767 - ljedrz:avoid_format, r=petrochenkovbors-5/+5
Prefer to_string() to format!() Simple benchmarks suggest in some cases it can be faster by even 37%: ``` test converting_f64_long ... bench: 339 ns/iter (+/- 199) test converting_f64_short ... bench: 136 ns/iter (+/- 34) test converting_i32_long ... bench: 87 ns/iter (+/- 16) test converting_i32_short ... bench: 87 ns/iter (+/- 49) test converting_str ... bench: 54 ns/iter (+/- 15) test formatting_f64_long ... bench: 349 ns/iter (+/- 176) test formatting_f64_short ... bench: 145 ns/iter (+/- 14) test formatting_i32_long ... bench: 98 ns/iter (+/- 14) test formatting_i32_short ... bench: 93 ns/iter (+/- 15) test formatting_str ... bench: 86 ns/iter (+/- 23) ```
2018-07-29Auto merge of #52764 - sinkuu:cleanup, r=nikomatsakisbors-11/+9
Misc cleanups
2018-07-28Don't display full blanket implementation and put it into its own sectionGuillaume Gomez-1/+5
2018-07-27Use str::repeatShotaro Yamada-11/+9
2018-07-27Prefer to_string() to format!()ljedrz-5/+5
2018-06-21Display async fn in rustdoc.Without Boats-0/+13
2018-06-20Make GenericBound explicitvarkor-2/+2
2018-06-20Rename ParamBound(s) to GenericBound(s)varkor-10/+10
2018-06-20Use ParamBounds in WhereRegionPredicatevarkor-1/+1
2018-06-20Lift bounds into GenericParamvarkor-10/+10
2018-06-20Refactor generic parameters in rustdoc/cleanvarkor-8/+8
2018-06-20Rename "parameter" to "arg"varkor-5/+5
2018-06-20Rename PathParameter(s) to GenericArg(s)varkor-3/+3
2018-05-15Auto merge of #48523 - varkor:generics-ty-generalisations, r=nikomatsakisbors-3/+3
The Great Generics Generalisation: Ty Edition Part of the generic parameter refactoring effort, split off from https://github.com/rust-lang/rust/pull/48149. Contains the `ty`-relative refactoring. r? @eddyb
2018-05-15Rename GenericParam to GenericParamDefvarkor-3/+3
2018-05-12rustdoc: Add support for pub(restricted)Oliver Middleton-2/+13
2018-04-26rustc_target: move in syntax::abi and flip dependency.Irina Popa-1/+1
2018-03-24CleanupShotaro Yamada-13/+2
2018-03-24Hide synthesized type parametersShotaro Yamada-3/+9
2018-02-16Remove hoedown from rustdocGuillaume Gomez-2/+1
Is it really time? Have our months, no, *years* of suffering come to an end? Are we finally able to cast off the pall of Hoedown? The weight which has dragged us down for so long? ----- So, timeline for those who need to catch up: * Way back in December 2016, [we decided we wanted to switch out the markdown renderer](https://github.com/rust-lang/rust/issues/38400). However, this was put on hold because the build system at the time made it difficult to pull in dependencies from crates.io. * A few months later, in March 2017, [the first PR was done, to switch out the renderers entirely](https://github.com/rust-lang/rust/pull/40338). The PR itself was fraught with CI and build system issues, but eventually landed. * However, not all was well in the Rustdoc world. During the PR and shortly after, we noticed [some differences in the way the two parsers handled some things](https://github.com/rust-lang/rust/issues/40912), and some of these differences were major enough to break the docs for some crates. * A couple weeks afterward, [Hoedown was put back in](https://github.com/rust-lang/rust/pull/41290), at this point just to catch tests that Pulldown was "spuriously" running. This would at least provide some warning about spurious tests, rather than just breaking spontaneously. * However, the problems had created enough noise by this point that just a few days after that, [Hoedown was switched back to the default](https://github.com/rust-lang/rust/pull/41431) while we came up with a solution for properly warning about the differences. * That solution came a few weeks later, [as a series of warnings when the HTML emitted by the two parsers was semantically different](https://github.com/rust-lang/rust/pull/41991). But that came at a cost, as now rustdoc needed proc-macro support (the new crate needed some custom derives farther down its dependency tree), and the build system was not equipped to handle it at the time. It was worked on for three months as the issue stumped more and more people. * In that time, [bootstrap was completely reworked](https://github.com/rust-lang/rust/pull/43059) to change how it ordered compilation, and [the method by which it built rustdoc would change](https://github.com/rust-lang/rust/pull/43482), as well. This allowed it to only be built after stage1, when proc-macros would be available, allowing the "rendering differences" PR to finally land. * The warnings were not perfect, and revealed a few [spurious](https://github.com/rust-lang/rust/pull/44368) [differences](https://github.com/rust-lang/rust/pull/45421) between how we handled the renderers. * Once these were handled, [we flipped the switch to turn on the "rendering difference" warnings all the time](https://github.com/rust-lang/rust/pull/45324), in October 2017. This began the "warning cycle" for this change, and landed in stable in 1.23, on 2018-01-04. * Once those warnings hit stable, and after a couple weeks of seeing whether we would get any more reports than what we got from sitting on nightly/beta, [we switched the renderers](https://github.com/rust-lang/rust/pull/47398), making Pulldown the default but still offering the option to use Hoedown. And that brings us to the present. We haven't received more new issues from this in the meantime, and the "switch by default" is now on beta. Our reasoning is that, at this point, anyone who would have been affected by this has run into it already.
2017-12-28rustdoc: Don't try to generate links for modules in import pathsOliver Middleton-24/+2
The modules may be private or may even be enums so it would generate dead links.
2017-12-21Add GenericParam, refactor Generics in ast, hir, rustdocJonas Platte-43/+20
The Generics now contain one Vec of an enum for the generic parameters, rather than two separate Vec's for lifetime and type parameters. Additionally, places that previously used Vec<LifetimeDef> now use Vec<GenericParam> instead.
2017-12-10Auto merge of #46232 - canndrew:never-docs, r=QuietMisdreavusbors-1/+1
Add docs for never primitive cc @nikomatsakis, @QuietMisdreavus
2017-12-09Use Try syntax for Option in place of macros or matchMatt Brubeck-9/+7
2017-11-29Fix invalid HTML escapeGuillaume Gomez-1/+1
2017-11-28link to never type docsAndrew Cann-1/+1
2017-10-17rustdoc: add a primitive page for "unit"Josh Stone-1/+1
In `src/libstd/primitive_docs.rs`, a `#[doc(primitive = "unit")]` section has sat long neglected. This patch teaches rustdoc to recognize "unit", and steals its trait implementations away from the tuple page.
2017-09-11rustc: replace usize with u64 and ConstUsize.Eduard-Mihai Burtescu-1/+1
2017-08-28Fix invalid linker positionGuillaume Gomez-1/+1
2017-08-01add documentation for function pointers as a primitiveQuietMisdreavus-5/+3
2017-07-30add docs for references as a primitiveQuietMisdreavus-19/+17
2017-06-24rustdoc: Don't ICE on `use *;`Oliver Middleton-1/+5