summary refs log tree commit diff
path: root/src/librustdoc/core.rs
AgeCommit message (Collapse)AuthorLines
2018-07-29Replace push loops with collect() and extend() where possibleljedrz-3/+1
2018-07-28Auto merge of #52585 - GuillaumeGomez:generic-impls, r=QuietMisdreavusbors-1/+3
[rustdoc] Generic impls Fixes #33772. r? @QuietMisdreavus
2018-07-25Add missing dynTatsuyuki Ishi-1/+1
2018-07-23Auto merge of #52211 - bjorn3:misc_rustdoc_changes, r=QuietMisdreavusbors-3/+3
Misc rustdoc changes
2018-07-23Auto merge of #52568 - oli-obk:span_bug_error, r=varkorbors-0/+1
Fix loop label resolution around constants And make `delay_span_bug` a little more helpful r? @varkor fixes #52442 fixes #52443
2018-07-22Working generic implGuillaume Gomez-2/+2
2018-07-22some improvementsGuillaume Gomez-1/+3
2018-07-22Add "self" intra-link supportGuillaume Gomez-2/+4
2018-07-20Make sure the compiler actually panics on `delay_span_bug`Oliver Schneider-0/+1
Even if that is just happening because of `abort_if_errors`
2018-07-13Misc rustdoc changesbjorn3-3/+3
2018-07-11Improve lint handling in rustdocGuillaume Gomez-3/+12
2018-07-09Auto merge of #51956 - GuillaumeGomez:shutdown-doc-lints, r=oli-obkbors-1/+21
Fix rustdoc run failures by shutting down definitely some lints Fixes #51661. cc @oli-obk @arielb1 @eddyb
2018-07-09add comment about lints whitelistingGuillaume Gomez-0/+2
2018-07-05Auto merge of #51732 - GuillaumeGomez:cmd-line-lint-rustdoc, r=QuietMisdreavusbors-2/+7
Add command line lint manipulation in rustdoc Fixes #50082. r? @QuietMisdreavus
2018-07-05Add command line lint manipulation in rustdocGuillaume Gomez-2/+7
2018-07-05Whitelist lintsGuillaume Gomez-6/+17
2018-07-05Fix rustdoc run failures by shutting down definitely some lintsGuillaume Gomez-1/+8
2018-06-26Auto merge of #51678 - Zoxc:combine-lints, r=estebankbors-2/+2
Combine all builtin late lints
2018-06-21Combine all builtin late lintsJohn Kåre Alsaker-2/+2
2018-06-20Rename ParamBound(s) to GenericBound(s)varkor-1/+1
2018-06-20Lift bounds into GenericParamvarkor-1/+1
2018-06-17Auto merge of #51382 - GuillaumeGomez:intra-link-lint, r=QuietMisdreavusbors-4/+21
Add lint for intra link resolution failure This PR is almost done, just remains this note: ``` note: requested on the command line with `-W intra-link-resolution-failure` ``` I have no idea why my lint is considered as being passed through command line and wasn't able to find where it was set. If anyone has an idea, it'd be very helpful! cc @QuietMisdreavus
2018-06-13Rename intra-doc lintGuillaume Gomez-1/+1
2018-06-13Fix options issuesGuillaume Gomez-8/+5
2018-06-11Fix extern prelude failure in rustdocGuillaume Gomez-1/+3
2018-06-09Add lint for intra link resolution failureGuillaume Gomez-4/+24
2018-06-04Fix crate-name option in rustdocGuillaume Gomez-1/+4
2018-05-21Stabilize suggestion applicability field in json outputManish Goregaokar-1/+0
2018-05-17Rename trans to codegen everywhere.Irina Popa-5/+5
2018-05-14factor out rustdoc's error message handlerQuietMisdreavus-32/+53
2018-05-13Add a Rayon thread poolJohn Kåre Alsaker-152/+153
2018-04-30Auto merge of #50204 - Manishearth:approx-enum, r=estebankbors-1/+1
Use enum for approximate suggestions r? @nrc @killercup
2018-04-26Rename rustc_back::target to rustc_target::spec.Irina Popa-1/+1
2018-04-25Approximate -> ApplicabilityManish Goregaokar-1/+1
2018-04-20fix some small compile errorsKurtis Nusbaum-1/+1
2018-04-17Make Handler more thread-safeJohn Kåre Alsaker-2/+2
2018-04-16Add error-format and color-config options to rustdocGuillaume Gomez-7/+38
2018-04-13add -C parameter to rustdocQuietMisdreavus-2/+4
2018-04-01Rollup merge of #49451 - QuietMisdreavus:epoch-doctests, r=GuillaumeGomezMark Simulacrum-1/+4
rustdoc: add an --edition flag to compile docs/doctests with a certain edition To correspond with the 2018 edition, this adds a (currently unstable) `--edition` flag to rustdoc that makes it compile crates and doctests with the given edition. Once this lands, Cargo should be updated to pass this flag when the edition configuration option is given.
2018-03-28Auto merge of #49019 - phil-opp:target-spec, r=pnkfelixbors-2/+4
Introduce a TargetTriple enum to support absolute target paths This PR replaces target triple strings with a `TargetTriple` enum, which represents either a target triple or a path to a JSON target file. The path variant is used if the `--target` argument has a `.json` extension, else the target triple variant is used. The motivation of this PR is support for absolute target paths to avoid the need for setting the `RUST_TARGET_PATH` environment variable (see rust-lang/cargo#4905 for more information). For places where some kind of triple is needed (e.g. in the sysroot folder), we use the file name (without extension). For compatibility, we keep the old behavior of searching for a file named `$(target_triple).json` in `RUST_TARGET_PATH` for non-official target triples.
2018-03-27add --edition flag to rustdocQuietMisdreavus-1/+4
2018-03-26Introduce a TargetTriple enum to support absolute target pathsPhilipp Oppermann-2/+4
2018-03-24Resolve `impl Trait` in argument positionShotaro Yamada-0/+3
2018-03-02Replace Rc with Lrc for shared dataJohn Kåre Alsaker-2/+3
2018-02-24Rollup merge of #48415 - QuietMisdreavus:traits-on-traits-on-traits, ↵Manish Goregaokar-0/+4
r=Manishearth rustdoc: don't crash when an external trait's docs needs to import another trait Fixes https://github.com/rust-lang/rust/issues/48414 When resolving intra-paths for an item, rustdoc needs to have information about their items on hand, for proper bookkeeping. When loading a path for an external item, it needs to load these items from their host crate, since their information isn't otherwise available. This includes resolving paths for those docs. which can cause this process to recurse. Rustdoc keeps a map of external traits in a `RefCell<HashMap<DefId, Trait>>`, and it keeps a borrow of this active when importing an external trait. In the linked crash, this led to a RefCell borrow error, panic, and ICE. This PR manually releases the borrow while importing the trait, and also keeps a list of traits being imported at the given moment. The latter keeps rustdoc from infinitely recursing as it tries to import the same trait repeatedly.
2018-02-21track extern traits being inlinedQuietMisdreavus-0/+4
2018-02-18Cleanup formattingAaron Hill-7/+5
2018-02-18Generate documentation for auto-trait implsAaron Hill-2/+25
A new section is added to both both struct and trait doc pages. On struct/enum pages, a new 'Auto Trait Implementations' section displays any synthetic implementations for auto traits. Currently, this is only done for Send and Sync. On trait pages, a new 'Auto Implementors' section displays all types which automatically implement the trait. Effectively, this is a list of all public types in the standard library. Synthesized impls for a particular auto trait ('synthetic impls') take into account generic bounds. For example, a type 'struct Foo<T>(T)' will have 'impl<T> Send for Foo<T> where T: Send' generated for it. Manual implementations of auto traits are also taken into account. If we have the following types: 'struct Foo<T>(T)' 'struct Wrapper<T>(Foo<T>)' 'unsafe impl<T> Send for Wrapper<T>' // pretend that Wrapper<T> makes this sound somehow Then Wrapper will have the following impl generated: 'impl<T> Send for Wrapper<T>' reflecting the fact that 'T: Send' need not hold for 'Wrapper<T>: Send' to hold Lifetimes, HRTBS, and projections (e.g. '<T as Iterator>::Item') are taken into account by synthetic impls However, if a type can *never* implement a particular auto trait (e.g. 'struct MyStruct<T>(*const T)'), then a negative impl will be generated (in this case, 'impl<T> !Send for MyStruct<T>') All of this means that a user should be able to copy-paste a synthetic impl into their code, without any observable changes in behavior (assuming the rest of the program remains unchanged).
2018-02-16Remove hoedown from rustdocGuillaume Gomez-7/+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.
2018-01-27rustc: Load the `rustc_trans` crate at runtimeAlex Crichton-3/+2
Building on the work of # 45684 this commit updates the compiler to unconditionally load the `rustc_trans` crate at runtime instead of linking to it at compile time. The end goal of this work is to implement # 46819 where rustc will have multiple backends available to it to load. This commit starts off by removing the `extern crate rustc_trans` from the driver. This involved moving some miscellaneous functionality into the `TransCrate` trait and also required an implementation of how to locate and load the trans backend. This ended up being a little tricky because the sysroot isn't always the right location (for example `--sysroot` arguments) so some extra code was added as well to probe a directory relative to the current dll (the rustc_driver dll). Rustbuild has been updated accordingly as well to have a separate compilation invocation for the `rustc_trans` crate and assembly it accordingly into the sysroot. Finally, the distribution logic for the `rustc` package was also updated to slurp up the trans backends folder. A number of assorted fallout changes were included here as well to ensure tests pass and such, and they should all be commented inline.