diff options
| author | bors <bors@rust-lang.org> | 2021-03-30 01:16:08 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-03-30 01:16:08 +0000 |
| commit | 902ca44c1953ad8f640e86d154c86cc1f5a3bde1 (patch) | |
| tree | a46df06066c2be5d86bcd1a57aada54b1c8cbf94 /src/test/rustdoc-ui | |
| parent | 50489e3b0048af4df6f0a92bb43af8afce9b6652 (diff) | |
| parent | 6738ee7d59b2bdf82a25a3e0486b31df550c5598 (diff) | |
| download | rust-902ca44c1953ad8f640e86d154c86cc1f5a3bde1.tar.gz rust-902ca44c1953ad8f640e86d154c86cc1f5a3bde1.zip | |
Auto merge of #83664 - Dylan-DPC:rollup-wx6idpd, r=Dylan-DPC
Rollup of 7 pull requests Successful merges: - #82331 (alloc: Added `as_slice` method to `BinaryHeap` collection) - #83130 (escape_ascii take 2) - #83374 (unix: Fix feature(unix_socket_ancillary_data) on macos and other BSDs) - #83543 (Lint on unknown intra-doc link disambiguators) - #83636 (Add a regression test for issue-82792) - #83643 (Remove a FIXME resolved by #73578) - #83644 (:arrow_up: rust-analyzer) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/test/rustdoc-ui')
| -rw-r--r-- | src/test/rustdoc-ui/intra-doc/unknown-disambiguator.rs | 13 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr | 45 |
2 files changed, 58 insertions, 0 deletions
diff --git a/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.rs b/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.rs new file mode 100644 index 00000000000..925fc515a3e --- /dev/null +++ b/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.rs @@ -0,0 +1,13 @@ +#![deny(warnings)] + +//! Linking to [foo@banana] and [`bar@banana!()`]. +//~^ ERROR unknown disambiguator `foo` +//~| ERROR unknown disambiguator `bar` +//! And to [no disambiguator](@nectarine) and [another](@apricot!()). +//~^ ERROR unknown disambiguator `` +//~| ERROR unknown disambiguator `` +//! And with weird backticks: [``foo@hello``] [foo`@`hello]. +//~^ ERROR unknown disambiguator `foo` +//~| ERROR unknown disambiguator `foo` + +fn main() {} diff --git a/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr b/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr new file mode 100644 index 00000000000..195aaca32a2 --- /dev/null +++ b/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr @@ -0,0 +1,45 @@ +error: unknown disambiguator `foo` + --> $DIR/unknown-disambiguator.rs:3:17 + | +LL | //! Linking to [foo@banana] and [`bar@banana!()`]. + | ^^^ + | +note: the lint level is defined here + --> $DIR/unknown-disambiguator.rs:1:9 + | +LL | #![deny(warnings)] + | ^^^^^^^^ + = note: `#[deny(rustdoc::broken_intra_doc_links)]` implied by `#[deny(warnings)]` + +error: unknown disambiguator `bar` + --> $DIR/unknown-disambiguator.rs:3:35 + | +LL | //! Linking to [foo@banana] and [`bar@banana!()`]. + | ^^^ + +error: unknown disambiguator `foo` + --> $DIR/unknown-disambiguator.rs:9:34 + | +LL | //! And with weird backticks: [``foo@hello``] [foo`@`hello]. + | ^^^ + +error: unknown disambiguator `foo` + --> $DIR/unknown-disambiguator.rs:9:48 + | +LL | //! And with weird backticks: [``foo@hello``] [foo`@`hello]. + | ^^^ + +error: unknown disambiguator `` + --> $DIR/unknown-disambiguator.rs:6:31 + | +LL | //! And to [no disambiguator](@nectarine) and [another](@apricot!()). + | ^ + +error: unknown disambiguator `` + --> $DIR/unknown-disambiguator.rs:6:57 + | +LL | //! And to [no disambiguator](@nectarine) and [another](@apricot!()). + | ^ + +error: aborting due to 6 previous errors + |
