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.
This commit is contained in:
Noah Lev 2022-01-06 14:49:28 -08:00
parent ca20d64fb7
commit 977a7ca2e4
2 changed files with 17 additions and 1 deletions

View File

@ -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() {}

View File

@ -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