about summary refs log tree commit diff
path: root/src/librustdoc/html
AgeCommit message (Collapse)AuthorLines
2021-08-06Fix highlighting for union keywordGuillaume Gomez-5/+65
2021-08-05Remove LightSpan and use Span directlyGuillaume Gomez-98/+44
2021-08-05Remove warnings/errors from compiler when using typeck_body in rustdoc span ↵Guillaume Gomez-5/+5
map builder
2021-08-05* Rename LightSpan::empty into LightSpan::dummyGuillaume Gomez-23/+19
* Add Classifier::new_light_span to wrap LightSpan::new_in_file constructor
2021-08-05Add missing root_path when generating links using hrefGuillaume Gomez-2/+26
2021-08-05Add documentation and FIXMEGuillaume Gomez-4/+7
2021-08-05Fix invalid generation of HTML in highlightGuillaume Gomez-41/+60
2021-08-05formattingGuillaume Gomez-30/+19
2021-08-05Use rustdoc Span in LinkFromSrc directlyGuillaume Gomez-6/+5
2021-08-05Move extra arguments for highlight URL generation into a new ContextInfo ↵Guillaume Gomez-40/+42
struct for better readability
2021-08-05Wrap the span_map tuple index into a type called "LightSpan"Guillaume Gomez-44/+68
2021-08-05Improve code readabilityGuillaume Gomez-57/+46
2021-08-05* Rename Span::from_rustc_span to Span::newGuillaume Gomez-1/+1
* Rename Span::wrap to Span::wrap_raw * Improve documentation for Span::wrap_raw
2021-08-05* Rename 'move_span' into 'local_span_to_global_span'Guillaume Gomez-14/+78
* Add documentation on new arguments/functions
2021-08-05Underline source code links on hoverGuillaume Gomez-0/+4
2021-08-05Update rustdoc testsGuillaume Gomez-3/+3
2021-08-05Generate links for modules as wellGuillaume Gomez-5/+24
2021-08-05Generate links for methods as wellGuillaume Gomez-19/+39
2021-08-05Add an option for the source code link generationGuillaume Gomez-3/+12
2021-08-05Add links on source types to go to definitionGuillaume Gomez-106/+449
2021-08-04Rollup merge of #87720 - matthiaskrgr:clippy_into, r=jyn514Yuki Okushi-3/+3
don't use .into() to convert types to identical types (clippy::useless_conversion) Example: let _x: String = String::from("hello world").into();
2021-08-03Simplify usage of CSS background-imageGuillaume Gomez-24/+57
2021-08-03Use empty string instead of single spaceMichael Howell-2/+2
2021-08-03Pull the "Expand" / "Collapse" text to the end of the line, instead of startMichael Howell-7/+17
2021-08-03Rustdoc accessibility: use an icon for the [-]/[+] controlsMichael Howell-8/+69
This way, we can show the plus and minus buttons on screens, while voice control will read off actual words "Collapse" and "Expand" instead of reading "open brace minus close brace" and "open brace plus close brace". Part of #87059
2021-08-03don't use .into() to convert types to identical types ↵Matthias Krüger-3/+3
(clippy::useless_conversion) Example: let _x: String = String::from("hello world").into();
2021-08-01Auto merge of #87449 - matthiaskrgr:clippyy_v2, r=nagisabors-2/+2
more clippy::complexity fixes (also a couple of clippy::perf fixes)
2021-07-29Rollup merge of #87451 - GuillaumeGomez:tuple-struct-field-doc, r=jyn514Yuki Okushi-12/+19
Add support for tuple struct field documentation Fixes #42615. This is #80320 updated to new codebase and with added tests. Part of https://github.com/rust-lang/rust/issues/83255. cc ```@camelid``` (since you were involved on the original PR). r? ```@jyn514```
2021-07-27Auto merge of #83484 - JulianKnodt:infer, r=oli-obk,lcnrbors-0/+1
Add hir::GenericArg::Infer In order to extend inference to consts, make an Infer type on hir::GenericArg.
2021-07-26Pass correct line number for indented code blocks.Abdalrhman Mohamed-1/+29
2021-07-26Rollup merge of #87474 - GuillaumeGomez:missing-whitespace-after-attr, ↵Guillaume Gomez-1/+1
r=notriddle Add missing whitespace after attribute in HTML template Firefox (even though it worked) highlights it as red when you look at the source code because there is a missing whitespace. r? `@notriddle`
2021-07-26Rollup merge of #87464 - camelid:rm-union-structhead, r=jyn514Guillaume Gomez-4/+2
Remove unnecessary `structhead` parameter from `render_union` `structhead` is used for `render_struct` so that the logic for rendering structs can be shared between struct variants and struct items. However, `render_union` is not used anywhere except for rendering union items, so its `structhead` parameter is unnecessary.
2021-07-26Rollup merge of #87444 - camelid:flatten-nested-format, r=jyn514Guillaume Gomez-2/+2
Flatten nested `format!` calls
2021-07-26Add missing whitespace after attribute in HTML templateGuillaume Gomez-1/+1
2021-07-26Add support for tuple struct fields documentation in enums as wellGuillaume Gomez-3/+7
2021-07-25Remove unnecessary `structhead` parameter from `render_union`Noah Lev-4/+2
`structhead` is used for `render_struct` so that the logic for rendering structs can be shared between struct variants and struct items. However, `render_union` is not used anywhere except for rendering union items, so its `structhead` parameter is unnecessary.
2021-07-25Auto merge of #87390 - notriddle:notriddle/rustdoc-headers-patch, ↵bors-22/+30
r=GuillaumeGomez Rustdoc accessibility: use real headers for doc items Part of #87059 Partially reverts #84703 Preview at: https://notriddle.com/notriddle-rustdoc-test/real-headers/std/index.html
2021-07-25Rustdoc accessibility: use real headers for doc itemsbors-22/+30
Part of #87059 Partially reverts #84703 Preview at: https://notriddle.com/notriddle-rustdoc-test/real-headers/std/index.html
2021-07-25Add support for tuple structs' fields documentationGuillaume Gomez-9/+12
2021-07-25don't slice slices (clippy::redundant_slicing)Matthias Krüger-2/+2
2021-07-25Add generic arg inferkadmin-0/+1
2021-07-25Auto merge of #87331 - camelid:summary-escaping, r=GuillaumeGomezbors-4/+13
Escape item search summaries I noticed that `Pin::new()`'s search summary looked off, and I realized that the reason is that it has inline code containing `Pin<P>`, which is not escaped and thus renders as a paragraph tag!
2021-07-24Flatten nested `format!` callsNoah Lev-2/+2
2021-07-24Escape item search summariesNoah Lev-4/+13
I noticed that `Pin::new()`'s search summary looked off, and I realized that the reason is that it has inline code containing `Pin<P>`, which is not escaped and thus renders as a paragraph tag!
2021-07-23Rollup merge of #87376 - Thomasdezeeuw:rustdoc-large-logo, r=GuillaumeGomezYuki Okushi-0/+1
Change rustdoc logo to use the full container size We have a logo in svg that scales nicely to large sizes, but by default is only 5px large, i.e. very small. With the change the logo expands to the full size. By only setting the height to 100% we ensure that the width-height ratio isn't changed.
2021-07-22Don't hide fields of enum struct variantsNoah Lev-5/+2
* The toggle adds visual clutter * It's easy to miss that there are fields * Tuple variant fields are always shown, so it is inconsistent to hide struct variant fields * It's annoying to have to click the toggle every time
2021-07-22Change rustdoc logo to use the full container sizeThomas de Zeeuw-0/+1
We have a logo in svg that scales nicely to large sizes, but by default is only 5px large, i.e. very small. With the change the logo expands to the full size. By only setting the height to 100% we ensure that the width-height ratio isn't changed.
2021-07-22Rollup merge of #87288 - ijackson:rustdoc-theme, r=GuillaumeGomezGuillaume Gomez-0/+2
rustdoc: Restore --default-theme, etc, by restoring varname escaping In #86157 cd0f93193c84ddc6698f9b65909da71c084dcb74 Use Tera templates for rustdoc. dropped the following transformation from the keys of the default settings element's `data-` attribute names: .map(|(k, v)| format!(r#" data-{}="{}""#, k.replace('-', "_"), Escape(v))) The `Escape` part is indeed no longer needed, because Tera does that for us. But the massaging of `-` to `_` is needed, for the (bizarre) reasons explained in the new comments. I have tested that the default theme function works again for me. I have also verified that passing (in shell syntax) '--default-theme="zork&"' escapes the value in the HTML. Closes #87263
2021-07-22Rollup merge of #87270 - GuillaumeGomez:item-summary-table, r=notriddleGuillaume Gomez-4/+11
Don't display <table> in item summary Fixes #87231. r? `@notriddle`
2021-07-21Don't render <table> in items' summaryGuillaume Gomez-4/+11