Add lint for intra link resolution failure

This commit is contained in:
Guillaume Gomez 2018-06-04 23:44:35 +02:00
parent 40f20b5327
commit b000cf0726
5 changed files with 76 additions and 9 deletions

View file

@ -0,0 +1,14 @@
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![deny(intra_link_resolution_failure)]
/// [v2] //~ ERROR
pub fn foo() {}

View file

@ -0,0 +1,16 @@
warning: [v2] cannot be resolved, ignoring it...
--> src/test/rustdoc-ui/deny-intra-link-resolution-failure.rs:13:1
|
LL | /// [v2] //~ ERROR
| ^^^^^^^^^^^^^^^^^^
|
note: lint level defined here
--> src/test/rustdoc-ui/deny-intra-link-resolution-failure.rs:11:9
|
LL | #![deny(intra_link_resolution_failure)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: the link appears in this line:
[v2] //~ ERROR
^^