about summary refs log tree commit diff
path: root/src/test/rustdoc-ui
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-08-06 18:33:29 -0400
committerJoshua Nelson <jyn514@gmail.com>2020-08-06 18:33:29 -0400
commitef54cde625966d4c103e067506ba31b3b79efec4 (patch)
tree27bd5e6c9b50d967c3dc5d3e9c422209f4e81f8f /src/test/rustdoc-ui
parent0c99d806eabd32a2ee2e6c71b400222b99c659e1 (diff)
downloadrust-ef54cde625966d4c103e067506ba31b3b79efec4.tar.gz
rust-ef54cde625966d4c103e067506ba31b3b79efec4.zip
Improve tests
Diffstat (limited to 'src/test/rustdoc-ui')
-rw-r--r--src/test/rustdoc-ui/intra-links-disambiguator-mismatch.rs6
-rw-r--r--src/test/rustdoc-ui/intra-links-disambiguator-mismatch.stderr22
2 files changed, 11 insertions, 17 deletions
diff --git a/src/test/rustdoc-ui/intra-links-disambiguator-mismatch.rs b/src/test/rustdoc-ui/intra-links-disambiguator-mismatch.rs
index 5af2ff06994..1a7a2fce7a3 100644
--- a/src/test/rustdoc-ui/intra-links-disambiguator-mismatch.rs
+++ b/src/test/rustdoc-ui/intra-links-disambiguator-mismatch.rs
@@ -2,10 +2,6 @@
 //~^ NOTE lint level is defined
 pub enum S {}
 
-impl S {
-    fn assoc_fn() {}
-}
-
 macro_rules! m {
     () => {};
 }
@@ -69,6 +65,4 @@ trait T {}
 //~^ ERROR incompatible link kind for `f`
 //~| NOTE this link resolved
 //~| HELP use its disambiguator
-
-/// Link to [S::assoc_fn()]
 pub fn f() {}
diff --git a/src/test/rustdoc-ui/intra-links-disambiguator-mismatch.stderr b/src/test/rustdoc-ui/intra-links-disambiguator-mismatch.stderr
index 7cf15db6017..9edf838f9d8 100644
--- a/src/test/rustdoc-ui/intra-links-disambiguator-mismatch.stderr
+++ b/src/test/rustdoc-ui/intra-links-disambiguator-mismatch.stderr
@@ -1,5 +1,5 @@
 error: incompatible link kind for `S`
-  --> $DIR/intra-links-disambiguator-mismatch.rs:18:14
+  --> $DIR/intra-links-disambiguator-mismatch.rs:14:14
    |
 LL | /// Link to [struct@S]
    |              ^^^^^^^^ help: to link to the enum, use its disambiguator: `enum@S`
@@ -12,7 +12,7 @@ LL | #![deny(broken_intra_doc_links)]
    = note: this link resolved to an enum, which is not a struct
 
 error: incompatible link kind for `S`
-  --> $DIR/intra-links-disambiguator-mismatch.rs:23:14
+  --> $DIR/intra-links-disambiguator-mismatch.rs:19:14
    |
 LL | /// Link to [mod@S]
    |              ^^^^^ help: to link to the enum, use its disambiguator: `enum@S`
@@ -20,7 +20,7 @@ LL | /// Link to [mod@S]
    = note: this link resolved to an enum, which is not a module
 
 error: incompatible link kind for `S`
-  --> $DIR/intra-links-disambiguator-mismatch.rs:28:14
+  --> $DIR/intra-links-disambiguator-mismatch.rs:24:14
    |
 LL | /// Link to [union@S]
    |              ^^^^^^^ help: to link to the enum, use its disambiguator: `enum@S`
@@ -28,7 +28,7 @@ LL | /// Link to [union@S]
    = note: this link resolved to an enum, which is not a union
 
 error: incompatible link kind for `S`
-  --> $DIR/intra-links-disambiguator-mismatch.rs:33:14
+  --> $DIR/intra-links-disambiguator-mismatch.rs:29:14
    |
 LL | /// Link to [trait@S]
    |              ^^^^^^^ help: to link to the enum, use its disambiguator: `enum@S`
@@ -36,7 +36,7 @@ LL | /// Link to [trait@S]
    = note: this link resolved to an enum, which is not a trait
 
 error: incompatible link kind for `T`
-  --> $DIR/intra-links-disambiguator-mismatch.rs:38:14
+  --> $DIR/intra-links-disambiguator-mismatch.rs:34:14
    |
 LL | /// Link to [struct@T]
    |              ^^^^^^^^ help: to link to the trait, use its disambiguator: `trait@T`
@@ -44,7 +44,7 @@ LL | /// Link to [struct@T]
    = note: this link resolved to a trait, which is not a struct
 
 error: incompatible link kind for `m`
-  --> $DIR/intra-links-disambiguator-mismatch.rs:43:14
+  --> $DIR/intra-links-disambiguator-mismatch.rs:39:14
    |
 LL | /// Link to [derive@m]
    |              ^^^^^^^^ help: to link to the macro, use its disambiguator: `m!`
@@ -52,7 +52,7 @@ LL | /// Link to [derive@m]
    = note: this link resolved to a macro, which is not a derive macro
 
 error: incompatible link kind for `s`
-  --> $DIR/intra-links-disambiguator-mismatch.rs:48:14
+  --> $DIR/intra-links-disambiguator-mismatch.rs:44:14
    |
 LL | /// Link to [const@s]
    |              ^^^^^^^ help: to link to the static, use its disambiguator: `static@s`
@@ -60,7 +60,7 @@ LL | /// Link to [const@s]
    = note: this link resolved to a static, which is not a constant
 
 error: incompatible link kind for `c`
-  --> $DIR/intra-links-disambiguator-mismatch.rs:53:14
+  --> $DIR/intra-links-disambiguator-mismatch.rs:49:14
    |
 LL | /// Link to [static@c]
    |              ^^^^^^^^ help: to link to the constant, use its disambiguator: `const@c`
@@ -68,7 +68,7 @@ LL | /// Link to [static@c]
    = note: this link resolved to a constant, which is not a static
 
 error: incompatible link kind for `c`
-  --> $DIR/intra-links-disambiguator-mismatch.rs:58:14
+  --> $DIR/intra-links-disambiguator-mismatch.rs:54:14
    |
 LL | /// Link to [fn@c]
    |              ^^^^ help: to link to the constant, use its disambiguator: `const@c`
@@ -76,7 +76,7 @@ LL | /// Link to [fn@c]
    = note: this link resolved to a constant, which is not a function
 
 error: incompatible link kind for `c`
-  --> $DIR/intra-links-disambiguator-mismatch.rs:63:14
+  --> $DIR/intra-links-disambiguator-mismatch.rs:59:14
    |
 LL | /// Link to [c()]
    |              ^^^ help: to link to the constant, use its disambiguator: `const@c`
@@ -84,7 +84,7 @@ LL | /// Link to [c()]
    = note: this link resolved to a constant, which is not a function
 
 error: incompatible link kind for `f`
-  --> $DIR/intra-links-disambiguator-mismatch.rs:68:14
+  --> $DIR/intra-links-disambiguator-mismatch.rs:64:14
    |
 LL | /// Link to [const@f]
    |              ^^^^^^^ help: to link to the function, use its disambiguator: `f()`