1
Fork 0

Fix tests and improve error message if :: isn't found

This commit is contained in:
Joshua Nelson 2020-08-20 23:14:41 -04:00
parent 42bed03500
commit f4e6ebd11a
5 changed files with 33 additions and 54 deletions

View file

@ -1,39 +1,19 @@
error: unresolved link to `std::io::oops`
--> $DIR/intra-link-errors.rs:4:6
error: unresolved link to `path::to::nonexistent::module`
--> $DIR/intra-link-errors.rs:8:6
|
LL | //! [std::io::oops]
| ^^^^^^^^^^^^^
LL | /// [path::to::nonexistent::module]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/intra-link-errors.rs:1:9
|
LL | #![deny(broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^
= note: this link resolves to the crate `std`, which is not an enum
= note: if this were an enum, it might have a variant which resolved
= note: this link partially resolves to the module `io`
= note: `io` has no field, variant, or associated item named `oops`
error: unresolved link to `std::io::oops::not::here`
--> $DIR/intra-link-errors.rs:5:6
|
LL | //! [std::io::oops::not::here]
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: no item named `std::io::oops::not` is in scope
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `path::to::nonexistent::module`
--> $DIR/intra-link-errors.rs:11:6
|
LL | /// [path::to::nonexistent::module]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: no item named `path::to::nonexistent` is in scope
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `f::A`
--> $DIR/intra-link-errors.rs:17:6
--> $DIR/intra-link-errors.rs:14:6
|
LL | /// [f::A]
| ^^^^
@ -42,34 +22,34 @@ LL | /// [f::A]
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `S::A`
--> $DIR/intra-link-errors.rs:22:6
--> $DIR/intra-link-errors.rs:19:6
|
LL | /// [S::A]
| ^^^^
|
= note: this link partially resolves to the struct `S`
= note: `S` has no field, variant, or associated item named `A`
= note: no `A` in `S`
error: unresolved link to `S::fmt`
--> $DIR/intra-link-errors.rs:27:6
--> $DIR/intra-link-errors.rs:24:6
|
LL | /// [S::fmt]
| ^^^^^^
|
= note: this link partially resolves to the struct `S`
= note: `S` has no field, variant, or associated item named `fmt`
= note: no `fmt` in `S`
error: unresolved link to `E::D`
--> $DIR/intra-link-errors.rs:32:6
--> $DIR/intra-link-errors.rs:29:6
|
LL | /// [E::D]
| ^^^^
|
= note: this link partially resolves to the enum `E`
= note: `E` has no field, variant, or associated item named `D`
= note: no `D` in `E`
error: unresolved link to `u8::not_found`
--> $DIR/intra-link-errors.rs:37:6
--> $DIR/intra-link-errors.rs:34:6
|
LL | /// [u8::not_found]
| ^^^^^^^^^^^^^
@ -77,7 +57,7 @@ LL | /// [u8::not_found]
= note: the builtin type `u8` does not have an associated item named `not_found`
error: unresolved link to `S`
--> $DIR/intra-link-errors.rs:41:6
--> $DIR/intra-link-errors.rs:38:6
|
LL | /// [S!]
| ^^ help: to link to the struct, use its disambiguator: `struct@S`
@ -85,7 +65,7 @@ LL | /// [S!]
= note: this link resolves to the struct `S`, which is not in the macro namespace
error: unresolved link to `T::g`
--> $DIR/intra-link-errors.rs:59:6
--> $DIR/intra-link-errors.rs:56:6
|
LL | /// [type@T::g]
| ^^^^^^^^^ help: to link to the associated function, use its disambiguator: `T::g()`
@ -93,7 +73,7 @@ LL | /// [type@T::g]
= note: this link resolves to the associated function `g`, which is not in the type namespace
error: unresolved link to `T::h`
--> $DIR/intra-link-errors.rs:64:6
--> $DIR/intra-link-errors.rs:61:6
|
LL | /// [T::h!]
| ^^^^^
@ -102,12 +82,12 @@ LL | /// [T::h!]
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `S::h`
--> $DIR/intra-link-errors.rs:51:6
--> $DIR/intra-link-errors.rs:48:6
|
LL | /// [type@S::h]
| ^^^^^^^^^ help: to link to the associated function, use its disambiguator: `S::h()`
|
= note: this link resolves to the associated function `h`, which is not in the type namespace
error: aborting due to 12 previous errors
error: aborting due to 10 previous errors