diff options
| author | bors <bors@rust-lang.org> | 2018-08-05 18:45:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-08-05 18:45:01 +0000 |
| commit | 73c78734bae8f2947a4bfdeabebeeb84ccf0b0e1 (patch) | |
| tree | ba666b97c4fb190ee2bff2ff7662913f748c99ab /src/test/rustdoc | |
| parent | 93a4cab45ad119003c9749861eb7ac749eb334e2 (diff) | |
| parent | e332985c03e583cb0e28f576af3102cc69ddec5b (diff) | |
| download | rust-73c78734bae8f2947a4bfdeabebeeb84ccf0b0e1.tar.gz rust-73c78734bae8f2947a4bfdeabebeeb84ccf0b0e1.zip | |
Auto merge of #52800 - QuietMisdreavus:do-not-pass-go, r=GuillaumeGomez
rustdoc: refactor how passes are structured, and turn intra-doc-link collection into a pass This builds on https://github.com/rust-lang/rust/pull/52751 and should not be merged until that finally finishes the bors queue Part 2 of my passes refactor. This introduces the concept of an "early pass", which is run right before exiting the compiler context. This is important for passes that may want to ask the compiler about things. For example, i took out the intra-doc-link collection and turned it into a early pass. I also made the `strip-hidden`, `strip-private` and `strip-priv-imports` passes occur as early passes, so that intra-doc-link collection wouldn't run on docs that weren't getting printed. Fixes https://github.com/rust-lang/rust/issues/51684, technically https://github.com/rust-lang/rust/issues/51468 too but that version of `h2` hits a legit intra-link error after that `>_>` r? @rust-lang/rustdoc
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/auxiliary/intra-link-extern-crate.rs | 13 | ||||
| -rw-r--r-- | src/test/rustdoc/intra-link-extern-crate.rs | 19 | ||||
| -rw-r--r-- | src/test/rustdoc/intra-link-private.rs | 18 |
3 files changed, 50 insertions, 0 deletions
diff --git a/src/test/rustdoc/auxiliary/intra-link-extern-crate.rs b/src/test/rustdoc/auxiliary/intra-link-extern-crate.rs new file mode 100644 index 00000000000..e4a194466cc --- /dev/null +++ b/src/test/rustdoc/auxiliary/intra-link-extern-crate.rs @@ -0,0 +1,13 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![crate_name="inner"] + +//! ooh, i'm a rebel just for [kicks] diff --git a/src/test/rustdoc/intra-link-extern-crate.rs b/src/test/rustdoc/intra-link-extern-crate.rs new file mode 100644 index 00000000000..5666f3bd2f2 --- /dev/null +++ b/src/test/rustdoc/intra-link-extern-crate.rs @@ -0,0 +1,19 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// aux-build:intra-link-extern-crate.rs + +// When loading `extern crate` statements, we would pull in their docs at the same time, even +// though they would never actually get displayed. This tripped intra-doc-link resolution failures, +// for items that aren't under our control, and not actually getting documented! + +#![deny(intra_doc_link_resolution_failure)] + +extern crate inner; diff --git a/src/test/rustdoc/intra-link-private.rs b/src/test/rustdoc/intra-link-private.rs new file mode 100644 index 00000000000..dbdfbc4e5ad --- /dev/null +++ b/src/test/rustdoc/intra-link-private.rs @@ -0,0 +1,18 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// Rustdoc would previously report resolution failures on items that weren't in the public docs. +// These failures were legitimate, but not truly relevant - the docs in question couldn't be +// checked for accuracy anyway. + +#![deny(intra_doc_link_resolution_failure)] + +/// ooh, i'm a [rebel] just for kicks +struct SomeStruct; |
