Skip to content

Commit 001445b

Browse files
add tests for new intra-doc-link behavior
1 parent 9e4e266 commit 001445b

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
#![crate_name="inner"]
12+
13+
//! ooh, i'm a rebel just for [kicks]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// aux-build:intra-link-extern-crate.rs
12+
13+
// When loading `extern crate` statements, we would pull in their docs at the same time, even
14+
// though they would never actually get displayed. This tripped intra-doc-link resolution failures,
15+
// for items that aren't under our control, and not actually getting documented!
16+
17+
#![deny(intra_doc_link_resolution_failure)]
18+
19+
extern crate inner;
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// Rustdoc would previously report resolution failures on items that weren't in the public docs.
12+
// These failures were legitimate, but not truly relevant - the docs in question couldn't be
13+
// checked for accuracy anyway.
14+
15+
#![deny(intra_doc_link_resolution_failure)]
16+
17+
/// ooh, i'm a [rebel] just for kicks
18+
struct SomeStruct;

0 commit comments

Comments
 (0)