]> git.lizzy.rs Git - rust.git/commitdiff
Rename intra-doc lint
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Wed, 13 Jun 2018 19:17:15 +0000 (21:17 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Wed, 13 Jun 2018 21:30:34 +0000 (23:30 +0200)
src/librustc/lint/builtin.rs
src/librustdoc/clean/mod.rs
src/librustdoc/core.rs
src/test/rustdoc-ui/deny-intra-link-resolution-failure.rs
src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr
src/test/rustdoc-ui/intra-links-warning.stderr

index e2acd77a3b6cb44b80e280bcffded77badad56fd..7d4a18c2a570b20f85d94fe4287738994eb041ba 100644 (file)
 }
 
 declare_lint! {
-    pub INTRA_LINK_RESOLUTION_FAILURE,
+    pub INTRA_DOC_LINK_RESOLUTION_FAILURE,
     Warn,
     "warn about documentation intra links resolution failure"
 }
@@ -357,7 +357,7 @@ fn get_lints(&self) -> LintArray {
             UNSTABLE_NAME_COLLISIONS,
             DUPLICATE_ASSOCIATED_TYPE_BINDINGS,
             DUPLICATE_MACRO_EXPORTS,
-            INTRA_LINK_RESOLUTION_FAILURE,
+            INTRA_DOC_LINK_RESOLUTION_FAILURE,
         )
     }
 }
index 9905c69b38da10ada1adac98a655a9cbd4c88e5e..4bdb1822450cc7410339544137ea2d7842300b43 100644 (file)
@@ -1284,13 +1284,13 @@ fn resolution_failure(
                 link_range.end + code_dox_len,
             );
 
-            diag = cx.tcx.struct_span_lint_node(lint::builtin::INTRA_LINK_RESOLUTION_FAILURE,
+            diag = cx.tcx.struct_span_lint_node(lint::builtin::INTRA_DOC_LINK_RESOLUTION_FAILURE,
                                                 NodeId::new(0),
                                                 sp,
                                                 &msg);
             diag.span_label(sp, "cannot be resolved, ignoring");
         } else {
-            diag = cx.tcx.struct_span_lint_node(lint::builtin::INTRA_LINK_RESOLUTION_FAILURE,
+            diag = cx.tcx.struct_span_lint_node(lint::builtin::INTRA_DOC_LINK_RESOLUTION_FAILURE,
                                                 NodeId::new(0),
                                                 sp,
                                                 &msg);
@@ -1310,7 +1310,7 @@ fn resolution_failure(
         }
         diag
     } else {
-        cx.tcx.struct_span_lint_node(lint::builtin::INTRA_LINK_RESOLUTION_FAILURE,
+        cx.tcx.struct_span_lint_node(lint::builtin::INTRA_DOC_LINK_RESOLUTION_FAILURE,
                                      NodeId::new(0),
                                      sp,
                                      &msg)
index f46d3d834ae0d664ccd8d0c5258654ec9a101132..89923653125a3b8c9ef58ac40738211ad8bacb29 100644 (file)
@@ -187,7 +187,7 @@ pub fn run_core(search_paths: SearchPaths,
         _ => None
     };
 
-    let intra_link_resolution_failure_name = lint::builtin::INTRA_LINK_RESOLUTION_FAILURE.name;
+    let intra_link_resolution_failure_name = lint::builtin::INTRA_DOC_LINK_RESOLUTION_FAILURE.name;
     let warnings_lint_name = lint::builtin::WARNINGS.name;
     let lints = lint::builtin::HardwiredLints.get_lints()
                     .iter()
index f816621c16f277b0cc4950eabcc45e41d394a827..85d19c8354788f35fb151d5791e2a4fcbd7c7980 100644 (file)
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![deny(intra_link_resolution_failure)]
+#![deny(intra_doc_link_resolution_failure)]
 
 /// [v2] //~ ERROR
 pub fn foo() {}
index 78526b3087a21fd7b2800c472935529eaade9330..66ee48ed4c9c011adafca2c8bcee9cd6cce53b5c 100644 (file)
@@ -7,7 +7,7 @@ error: `[v2]` cannot be resolved, ignoring it...
 note: lint level defined here
   --> $DIR/deny-intra-link-resolution-failure.rs:11:9
    |
-11 | #![deny(intra_link_resolution_failure)]
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+11 | #![deny(intra_doc_link_resolution_failure)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
 
index 6e47114af7050041ba43e7dab323831e9eb44e00..2a51e94b1f5d78c69850231fe54f3154ea701901 100644 (file)
@@ -4,7 +4,7 @@ warning: `[Foo::baz]` cannot be resolved, ignoring it...
 13 |        //! Test with [Foo::baz], [Bar::foo], ...
    |                       ^^^^^^^^ cannot be resolved, ignoring
    |
-   = note: #[warn(intra_link_resolution_failure)] on by default
+   = note: #[warn(intra_doc_link_resolution_failure)] on by default
    = help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
 
 warning: `[Bar::foo]` cannot be resolved, ignoring it...