summary refs log tree commit diff
path: root/src/librustdoc
AgeCommit message (Collapse)AuthorLines
2019-06-26Revert "Set test flag when rustdoc is running with --test option"Oliver Middleton-3/+0
This reverts commit 8ed2292dbe75b9b65e9fe1a079428d1e1e3b610f. It caused doctests in this repository to no longer be tested including all of the core crate.
2019-06-06upgrade rustdoc's `pulldown-cmark` to 0.5.2Andy Russell-6/+6
Fixes #60482.
2019-05-20Rollup merge of #60487 - GuillaumeGomez:fix-search-sidebar-width-colors, ↵Mazdak Farrokhzad-9/+10
r=Dylan-DPC Fix search sidebar width when no crate select is present Fixes #60480. I also fixed the box-shadow that seemed to have been kind of removed? r? @QuietMisdreavus
2019-05-20Rollup merge of #60383 - ↵Mazdak Farrokhzad-207/+214
GuillaumeGomez:fix-position-source-code-files-toggle, r=Manishearth Fix position source code files toggle Fixes #60381. The second commit is a big cleanup of the media queries. r? @rust-lang/rustdoc cc @Manishearth screenshot of the fix: <img width="501" alt="Screenshot 2019-04-29 at 23 42 56" src="https://user-images.githubusercontent.com/3050060/56929111-112b2b00-6ad9-11e9-9a23-e0a8e3641395.png">
2019-05-20Auto merge of #60969 - Centril:rollup-3j71mqj, r=Centrilbors-17/+43
Rollup of 6 pull requests Successful merges: - #60590 (Test interaction of unions with non-zero/niche-filling optimization) - #60745 (Perform constant propagation into terminators) - #60895 (Enable thumbv7a-pc-windows-msvc target build end to end in rust/master) - #60908 (Fix lints handling in rustdoc) - #60960 (Stop using gensyms in HIR lowering) - #60962 (Fix data types indication) Failed merges: r? @ghost
2019-05-20Rollup merge of #60908 - GuillaumeGomez:errors, r=oli-obkMazdak Farrokhzad-17/+43
Fix lints handling in rustdoc Part of #60664: now lints are handled just like any other lints you would setup in rustc. Still remains to handle `missing code examples` and `missing_docs` as part of the same group. r? @oli-obk
2019-05-19Auto merge of #60272 - Jakst:patch-1, r=Manishearthbors-5/+24
Explicitly set height on rust logo <img> element in docs The layout of the left side menu in docs reflows when navigating between pages because of missing height on the <img> element of rust logo. Setting height='100' tells the browser to reserve that vertical space, leading to a less janky experience.
2019-05-19Auto merge of #60065 - QuietMisdreavus:async-move-doctests, r=ollie27bors-75/+115
rustdoc: set the default edition when pre-parsing a doctest Fixes https://github.com/rust-lang/rust/issues/59313 (possibly more? i think we've had issues with parsing edition-specific syntax in doctests at some point) When handling a doctest, rustdoc needs to parse it beforehand, so that it can see whether it declares a `fn main` or `extern crate my_crate` explicitly. However, while doing this, rustdoc doesn't set the "default edition" used by the parser like the regular compilation runs do. This caused a problem when parsing a doctest with an `async move` block in it, since it was expecting the `move` keyword to start a closure, not a block. This PR changes the `rustdoc::test::make_test` function to set the parser's default edition while looking for a main function and `extern crate` statement. However, to do this, `make_test` needs to know what edition to set. Since this is also used during the HTML rendering process (to make playground URLs), now the HTML renderer needs to know about the default edition. Upshot: rendering standalone markdown files can now accept a "default edition" for their doctests with the `--edition` flag! (I'm pretty sure i waffled around how to set that a long time ago when we first added the `--edition` flag... `>_>`) I'm posting this before i stop for the night so that i can write this description while it's still in my head, but before this merges i want to make sure that (1) the `rustdoc-ui/failed-doctest-output` test still works (i expect it doesn't), and (2) i add a test with the sample from the linked issue.
2019-05-19Auto merge of #60760 - GuillaumeGomez:generic-display, r=varkor,badboybors-4/+5
Fix display of const generics in rustdoc <img width="745" alt="Screenshot 2019-05-18 at 15 45 22" src="https://user-images.githubusercontent.com/3050060/57970638-04854e80-7984-11e9-9f04-da6b51ec8bc7.png"> Part of #60737. cc @varkor r? @badboy
2019-05-19Rollup merge of #60934 - fabric-and-ink:defindex_with_newtype_macro, ↵Mazdak Farrokhzad-1/+1
r=petrochenkov Declare DefIndex with the newtype_index macro See #60666
2019-05-19Rollup merge of #60931 - cuviper:array-iter, r=KodrAusMazdak Farrokhzad-2/+2
Use iter() for iterating arrays by slice These `into_iter()` calls will change from iterating references to values if we ever get `IntoIterator` for arrays, which may break the code using that iterator. Calling `iter()` is future proof.
2019-05-18Auto merge of #60093 - GuillaumeGomez:fix-attrs-pos, r=Manishearthbors-28/+49
Fix attrs pos Fixes #60042. Screenshot: <img width="438" alt="Screenshot 2019-05-12 at 15 02 25" src="https://user-images.githubusercontent.com/3050060/57582606-1455ec00-74c7-11e9-9d4e-5ec4da4de7dd.png"> r? @rust-lang/rustdoc
2019-05-18Fix display of const generics in rustdocGuillaume Gomez-4/+5
2019-05-18Declare DefIndex with the newtype_index macroFabian Drinck-1/+1
2019-05-18Fix lints handling in rustdocGuillaume Gomez-17/+43
2019-05-17Use iter() for iterating arrays by sliceJosh Stone-2/+2
These `into_iter()` calls will change from iterating references to values if we ever get `IntoIterator` for arrays, which may break the code using that iterator. Calling `iter()` is future proof.
2019-05-17Avoid unnecessary interning in `Ident::from_str()` calls.Nicholas Nethercote-2/+3
A lot of these static symbols are pre-interned.
2019-05-14Add comment to explain what is the top parameterGuillaume Gomez-0/+8
2019-05-13Remove bitrig support from rustMarcel Hellwig-1/+0
2019-05-13Return a `Symbol` from `name_or_empty` functions.Nicholas Nethercote-22/+22
2019-05-13Remove the equality operation between `Symbol` and strings.Nicholas Nethercote-7/+7
And also the equality between `Path` and strings, because `Path` is made up of `Symbol`s.
2019-05-13Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.Nicholas Nethercote-61/+71
2019-05-11Address comments + Fix testsVadim Petrochenkov-0/+2
2019-05-11Simplify conversions between tokens and semantic literalsVadim Petrochenkov-14/+10
2019-05-11Eliminate `comments::Literal`Vadim Petrochenkov-8/+8
2019-05-11Keep the original token in `ast::Lit`Vadim Petrochenkov-0/+2
2019-05-09cleanup: Remove `DefIndexAddressSpace`Vadim Petrochenkov-9/+6
2019-05-07Rollup merge of #60489 - GuillaumeGomez:remove-hamburger, r=QuietMisdreavusMazdak Farrokhzad-0/+4
Remove hamburger button from source code page Fixes #60483. Screenshot: <img width="575" alt="Screenshot 2019-05-03 at 00 12 51" src="https://user-images.githubusercontent.com/3050060/57110298-61ec8f00-6d38-11e9-85fd-d13be94b9c52.png"> cc @rust-lang/rustdoc
2019-05-06don't pre-allocate the default edition stringQuietMisdreavus-7/+10
2019-05-06update rustdoc doc testQuietMisdreavus-1/+5
2019-05-06update rustdoc unit testsQuietMisdreavus-21/+25
2019-05-06set the default edition when pre-parsing a doctestQuietMisdreavus-52/+81
2019-05-06Ignore const parameters when constructing type bounds in rustdocvarkor-3/+1
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-05-05Rollup merge of #60515 - euclio:div-in-heading, r=GuillaumeGomezManish Goregaokar-2/+2
use span instead of div for since version Fixes #60403. r? @GuillaumeGomez
2019-05-04Rename `Res::kind_name` to `Res::descr` for consistencyVadim Petrochenkov-5/+5
2019-05-03rustc: rename hir::def::Def to Res (short for "resolution").Eduard-Mihai Burtescu-199/+198
2019-05-03rustc: use DefKind instead of Def, where possible.Eduard-Mihai Burtescu-27/+19
2019-05-03rustc: factor most DefId-containing variants out of Def and into DefKind.Eduard-Mihai Burtescu-82/+106
2019-05-03use span instead of div for since versionAndy Russell-2/+2
2019-05-03Rollup merge of #60220 - euclio:rustdoc-test-fatal-parsing-errors, ↵Mazdak Farrokhzad-4/+19
r=QuietMisdreavus report fatal errors during doctest parsing Fixes #59557.
2019-05-03Remove hamburger button from source code pageGuillaume Gomez-0/+4
2019-05-02Fix search sidebar width when no crate select is presentGuillaume Gomez-9/+10
2019-05-01Auto merge of #60137 - eddyb:rustdoc-rm-def-ctor-hax, r=petrochenkovbors-604/+176
rustdoc: remove def_ctor hack. ~~No longer necessary since we have `describe_def`.~~ Turns out `def_ctor` was used in conjunction with abusing `tcx.type_of(def_id)` working on both type definitions and `impl`s (specifically, of builtin types), but also reimplementing a lot of the logic that `Clean` already provides on `Ty` / `ty::TraitRef`. The first commit now does the minimal refactor to keep it working, while the second commit contains the rest of the refactor I started (parts of which I'm not sure we need to keep).
2019-04-30Rollup merge of #60382 - Manishearth:revert-code-font, r=GuillaumeGomezMazdak Farrokhzad-3/+3
Revert "Update Source Code Pro fonts to version 2.030" Temporary fix for https://github.com/rust-lang/rust/issues/60365 https://github.com/rust-lang/rust/pull/60146 updated all fonts (not just the fonts that were buggy), however it looks like the new Source Code Pro is buggy. We should test this out of tree: `cargo doc` on anything, replace the font in `target/doc`, and use `python -m SimpleHTTPServer` to see what's going on. Till we figure that out, I'll just back this out. r? @GuillaumeGomez This reverts commit 6bafc58cedc6f409dbcd8919a25b2f5d425f42ae.
2019-04-30Rollup merge of #60344 - Aaron1011:fix/tower-hyper, r=eddybMazdak Farrokhzad-0/+1
Don't try to render auto-trait bounds with any inference variables Previously, we checked if the target of a projection type was itself an inference variable. However, for Rustdoc rendering purposes, there's no distinction between an inference variable ('_') and a type containing one (e.g. (MyStruct<u8, _>)) - we don't want to render either of them. Fixes #60269 Due to the complexity of the original bug, which spans three different crates (hyper, tower-hyper, and tower), I have been unable to create a minimized reproduction for the issue.
2019-04-30rustdoc: refactor(?) synthetic impl building.Eduard-Mihai Burtescu-143/+83
2019-04-30rustdoc: remove def_ctor hack.Eduard-Mihai Burtescu-503/+135
2019-04-30Cleanup media queriesGuillaume Gomez-184/+179
2019-04-30Improve file sidebar in source code view page on mobileGuillaume Gomez-33/+45
2019-04-29Revert "Update Source Code Pro fonts to version 2.030"Manish Goregaokar-3/+3
This reverts commit 6bafc58cedc6f409dbcd8919a25b2f5d425f42ae.