mirror of
https://github.com/rust-lang/rust
synced 2024-10-03 15:26:41 +00:00
add tests for new intra-doc-link behavior
This commit is contained in:
parent
9e4e266877
commit
001445b235
13
src/test/rustdoc/auxiliary/intra-link-extern-crate.rs
Normal file
13
src/test/rustdoc/auxiliary/intra-link-extern-crate.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
// Copyright 2018 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.
|
||||
|
||||
#![crate_name="inner"]
|
||||
|
||||
//! ooh, i'm a rebel just for [kicks]
|
19
src/test/rustdoc/intra-link-extern-crate.rs
Normal file
19
src/test/rustdoc/intra-link-extern-crate.rs
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Copyright 2018 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.
|
||||
|
||||
// aux-build:intra-link-extern-crate.rs
|
||||
|
||||
// When loading `extern crate` statements, we would pull in their docs at the same time, even
|
||||
// though they would never actually get displayed. This tripped intra-doc-link resolution failures,
|
||||
// for items that aren't under our control, and not actually getting documented!
|
||||
|
||||
#![deny(intra_doc_link_resolution_failure)]
|
||||
|
||||
extern crate inner;
|
18
src/test/rustdoc/intra-link-private.rs
Normal file
18
src/test/rustdoc/intra-link-private.rs
Normal file
|
@ -0,0 +1,18 @@
|
|||
// Copyright 2018 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.
|
||||
|
||||
// Rustdoc would previously report resolution failures on items that weren't in the public docs.
|
||||
// These failures were legitimate, but not truly relevant - the docs in question couldn't be
|
||||
// checked for accuracy anyway.
|
||||
|
||||
#![deny(intra_doc_link_resolution_failure)]
|
||||
|
||||
/// ooh, i'm a [rebel] just for kicks
|
||||
struct SomeStruct;
|
Loading…
Reference in a new issue