diff options
| author | Noah Lev <camelidcamel@gmail.com> | 2022-01-06 14:49:28 -0800 |
|---|---|---|
| committer | Noah Lev <camelidcamel@gmail.com> | 2022-01-10 19:23:26 -0800 |
| commit | 977a7ca2e4b9c02d7f43a999bbeee651a31241d8 (patch) | |
| tree | fce032549bd09a0b7730268b93d62b2334a24fb5 | |
| parent | ca20d64fb77dc0aa5448e7bf9bcaa19164f1f521 (diff) | |
| download | rust-977a7ca2e4b9c02d7f43a999bbeee651a31241d8.tar.gz rust-977a7ca2e4b9c02d7f43a999bbeee651a31241d8.zip | |
Add test for disambiguator mismatch with crate
This currently calls `std` a "crate" in one part of the message and a "module" in another part. The next commits fix this so it says "crate" in both places.
| -rw-r--r-- | src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.rs | 5 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr | 13 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.rs b/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.rs index 142008cf765..ae48db48c18 100644 --- a/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.rs +++ b/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.rs @@ -73,4 +73,9 @@ trait T {} //~^ ERROR incompatible link kind for `f` //~| NOTE this link resolved //~| HELP add parentheses + +/// Link to [fn@std] +//~^ ERROR unresolved link to `std` +//~| NOTE this link resolves to the crate `std` +//~| HELP to link to the module, prefix with `mod@` pub fn f() {} diff --git a/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr b/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr index 12122f5fa86..1d48b5f7471 100644 --- a/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr +++ b/src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr @@ -138,5 +138,16 @@ LL - /// Link to [const@f] LL + /// Link to [f()] | -error: aborting due to 12 previous errors +error: unresolved link to `std` + --> $DIR/disambiguator-mismatch.rs:77:14 + | +LL | /// Link to [fn@std] + | ^^^^^^ this link resolves to the crate `std`, which is not in the value namespace + | +help: to link to the module, prefix with `mod@` + | +LL | /// Link to [mod@std] + | ~~~~ + +error: aborting due to 13 previous errors |
