Add check-pass tests and fix test behavior

This commit is contained in:
Kyle Lin 2023-07-01 01:20:33 +08:00
parent 5ce6cc7df3
commit 0e2f2cccd7
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,4 @@
// check-pass
/// [Vec][std::vec::Vec#examples] should not warn, because it's not actually redundant!
pub fn func() {}

View file

@ -1,4 +1,5 @@
#![crate_name = "foo"]
#![allow(rustdoc::redundant_explicit_links)]
//! # Description test crate
//!
//! This is the contents of the test crate docstring.
@ -26,5 +27,5 @@ pub fn foo_fn() {}
// @has 'foo/fn.bar_fn.html' '//meta[@name="description"]/@content' \
// 'Description with intra-doc link to foo_fn and [nonexistent_item] and foo_fn.'
#[allow(rustdoc::broken_intra_doc_links)]
/// Description with intra-doc link to [foo_fn] and [nonexistent_item] and [foo_fn].
/// Description with intra-doc link to [foo_fn] and [nonexistent_item] and [foo_fn](self::foo_fn).
pub fn bar_fn() {}