Rollup merge of #123574 - notriddle:notriddle/issue-d, r=fmease
rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 6) Follow up * https://github.com/rust-lang/rust/pull/116214 * https://github.com/rust-lang/rust/pull/116432 * https://github.com/rust-lang/rust/pull/116824 * https://github.com/rust-lang/rust/pull/118105 * https://github.com/rust-lang/rust/pull/119561
This commit is contained in:
commit
e7c13c3357
@ -1,4 +1,6 @@
|
||||
//@ check-pass
|
||||
// This shouldn't cause a stack overflow when rustdoc is run
|
||||
// https://github.com/rust-lang/rust/issues/56701
|
||||
|
||||
use std::ops::Deref;
|
||||
use std::ops::DerefMut;
|
@ -1,5 +1,6 @@
|
||||
// Regression test for ICE #73061
|
||||
// Regression test for ICE https://github.com/rust-lang/rust/issues/73061
|
||||
|
||||
//@ check-pass
|
||||
//@ aux-build:issue-73061.rs
|
||||
|
||||
extern crate issue_73061;
|
@ -1,3 +1,4 @@
|
||||
// https://github.com/rust-lang/rust/issues/78673
|
||||
#![crate_name = "issue_78673"]
|
||||
|
||||
pub trait Something {}
|
@ -1,4 +1,7 @@
|
||||
// @has 'issue_76501/fn.bloop.html' '//pre' 'pub const fn bloop() -> i32'
|
||||
// https://github.com/rust-lang/rust/issues/76501
|
||||
#![crate_name="foo"]
|
||||
|
||||
// @has 'foo/fn.bloop.html' '//pre' 'pub const fn bloop() -> i32'
|
||||
/// A useless function that always returns 1.
|
||||
pub const fn bloop() -> i32 {
|
||||
1
|
||||
@ -8,7 +11,7 @@ pub const fn bloop() -> i32 {
|
||||
pub struct Struct {}
|
||||
|
||||
impl Struct {
|
||||
// @has 'issue_76501/struct.Struct.html' '//*[@class="method"]' \
|
||||
// @has 'foo/struct.Struct.html' '//*[@class="method"]' \
|
||||
// 'pub const fn blurp() -> i32'
|
||||
/// A useless function that always returns 1.
|
||||
pub const fn blurp() -> i32 {
|
@ -1,6 +1,9 @@
|
||||
// https://github.com/rust-lang/rust/issues/79201
|
||||
#![crate_name="foo"]
|
||||
|
||||
#![feature(doc_cfg)]
|
||||
|
||||
// @has 'issue_79201/trait.Foo.html'
|
||||
// @has 'foo/trait.Foo.html'
|
||||
// @count - '//*[@class="stab portability"]' 6
|
||||
// @matches - '//*[@class="stab portability"]' 'crate feature foo-root'
|
||||
// @matches - '//*[@class="stab portability"]' 'crate feature foo-public-mod'
|
@ -1,8 +1,10 @@
|
||||
//@ compile-flags: -Zunstable-options --document-private-items --document-hidden-items
|
||||
// https://github.com/rust-lang/rust/issues/67851
|
||||
#![crate_name="foo"]
|
||||
|
||||
// @has issue_67851_both/struct.Hidden.html
|
||||
// @has foo/struct.Hidden.html
|
||||
#[doc(hidden)]
|
||||
pub struct Hidden;
|
||||
|
||||
// @has issue_67851_both/struct.Private.html
|
||||
// @has foo/struct.Private.html
|
||||
struct Private;
|
10
tests/rustdoc/doc-hidden-private-67851-hidden.rs
Normal file
10
tests/rustdoc/doc-hidden-private-67851-hidden.rs
Normal file
@ -0,0 +1,10 @@
|
||||
//@ compile-flags: -Zunstable-options --document-hidden-items
|
||||
// https://github.com/rust-lang/rust/issues/67851
|
||||
#![crate_name="foo"]
|
||||
|
||||
// @has foo/struct.Hidden.html
|
||||
#[doc(hidden)]
|
||||
pub struct Hidden;
|
||||
|
||||
// @!has foo/struct.Private.html
|
||||
struct Private;
|
9
tests/rustdoc/doc-hidden-private-67851-neither.rs
Normal file
9
tests/rustdoc/doc-hidden-private-67851-neither.rs
Normal file
@ -0,0 +1,9 @@
|
||||
// https://github.com/rust-lang/rust/issues/67851
|
||||
#![crate_name="foo"]
|
||||
|
||||
// @!has foo/struct.Hidden.html
|
||||
#[doc(hidden)]
|
||||
pub struct Hidden;
|
||||
|
||||
// @!has foo/struct.Private.html
|
||||
struct Private;
|
10
tests/rustdoc/doc-hidden-private-67851-private.rs
Normal file
10
tests/rustdoc/doc-hidden-private-67851-private.rs
Normal file
@ -0,0 +1,10 @@
|
||||
//@ compile-flags: --document-private-items
|
||||
// https://github.com/rust-lang/rust/issues/67851
|
||||
#![crate_name="foo"]
|
||||
|
||||
// @!has foo/struct.Hidden.html
|
||||
#[doc(hidden)]
|
||||
pub struct Hidden;
|
||||
|
||||
// @has foo/struct.Private.html
|
||||
struct Private;
|
@ -1,3 +1,6 @@
|
||||
// https://github.com/rust-lang/rust/issues/74083
|
||||
#![crate_name="foo"]
|
||||
|
||||
use std::ops::Deref;
|
||||
|
||||
pub struct Foo;
|
||||
@ -6,7 +9,7 @@ impl Foo {
|
||||
pub fn foo(&mut self) {}
|
||||
}
|
||||
|
||||
// @has issue_74083/struct.Bar.html
|
||||
// @has foo/struct.Bar.html
|
||||
// @!has - '//div[@class="sidebar-links"]/a[@href="#method.foo"]' 'foo'
|
||||
pub struct Bar {
|
||||
foo: Foo,
|
@ -2,6 +2,7 @@
|
||||
//@ aux-build:real_gimli.rs
|
||||
|
||||
// Ensure unstably exported traits have their Implementors sections.
|
||||
// https://github.com/rust-lang/rust/issues/75588
|
||||
|
||||
#![crate_name = "foo"]
|
||||
#![feature(extremely_unstable_foo)]
|
@ -1,4 +1,5 @@
|
||||
//@ aux-build:issue-57180.rs
|
||||
// https://github.com/rust-lang/rust/issues/57180
|
||||
|
||||
extern crate issue_57180;
|
||||
use issue_57180::Trait;
|
@ -1,3 +1,5 @@
|
||||
// https://github.com/rust-lang/rust/issues/72340
|
||||
|
||||
#![crate_name = "foo"]
|
||||
|
||||
pub struct Body;
|
@ -1,8 +0,0 @@
|
||||
//@ compile-flags: -Zunstable-options --document-hidden-items
|
||||
|
||||
// @has issue_67851_hidden/struct.Hidden.html
|
||||
#[doc(hidden)]
|
||||
pub struct Hidden;
|
||||
|
||||
// @!has issue_67851_hidden/struct.Private.html
|
||||
struct Private;
|
@ -1,6 +0,0 @@
|
||||
// @!has issue_67851_neither/struct.Hidden.html
|
||||
#[doc(hidden)]
|
||||
pub struct Hidden;
|
||||
|
||||
// @!has issue_67851_neither/struct.Private.html
|
||||
struct Private;
|
@ -1,8 +0,0 @@
|
||||
//@ compile-flags: --document-private-items
|
||||
|
||||
// @!has issue_67851_private/struct.Hidden.html
|
||||
#[doc(hidden)]
|
||||
pub struct Hidden;
|
||||
|
||||
// @has issue_67851_private/struct.Private.html
|
||||
struct Private;
|
@ -1,4 +1,5 @@
|
||||
// This code caused a panic in `pulldown-cmark` 0.4.1.
|
||||
// https://github.com/rust-lang/rust/issues/60482
|
||||
|
||||
pub const BASIC_UNICODE: bool = true;
|
||||
|
@ -1,3 +1,4 @@
|
||||
// https://github.com/rust-lang/rust/issues/78701
|
||||
#![crate_name = "foo"]
|
||||
|
||||
// This test ensures that if a blanket impl has the same ID as another impl, it'll
|
@ -1,3 +1,6 @@
|
||||
// https://github.com/rust-lang/rust/issues/56822
|
||||
#![crate_name="foo"]
|
||||
|
||||
struct Wrapper<T>(T);
|
||||
|
||||
trait MyTrait {
|
||||
@ -16,7 +19,7 @@ impl<'a, T> MyTrait for Inner<'a, T> {
|
||||
type Output = &'a T;
|
||||
}
|
||||
|
||||
// @has issue_56822/struct.Parser.html
|
||||
// @has foo/struct.Parser.html
|
||||
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
|
||||
// "impl<'a> Send for Parser<'a>"
|
||||
pub struct Parser<'a> {
|
@ -1,3 +1,6 @@
|
||||
// https://github.com/rust-lang/rust/issues/60726
|
||||
#![crate_name="foo"]
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
pub struct True;
|
||||
@ -25,7 +28,7 @@ unsafe impl<I> Send for DynTrait<I>
|
||||
I:InterfaceType<Send=True>
|
||||
{}
|
||||
|
||||
// @has issue_60726/struct.IntoIter.html
|
||||
// @has foo/struct.IntoIter.html
|
||||
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
|
||||
// "impl<T> !Send for IntoIter<T>"
|
||||
// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl"]//h3[@class="code-header"]' \
|
@ -1,14 +1,16 @@
|
||||
//@ aux-build:issue-61592.rs
|
||||
// https://github.com/rust-lang/rust/issues/61592
|
||||
#![crate_name="bar"]
|
||||
|
||||
extern crate foo;
|
||||
|
||||
// @has issue_61592/index.html
|
||||
// @has bar/index.html
|
||||
// @has - '//a[@href="#reexports"]' 'Re-exports'
|
||||
// @has - '//code' 'pub use foo::FooTrait as _;'
|
||||
// @!has - '//a[@href="trait._.html"]' ''
|
||||
pub use foo::FooTrait as _;
|
||||
|
||||
// @has issue_61592/index.html
|
||||
// @has bar/index.html
|
||||
// @has - '//a[@href="#reexports"]' 'Re-exports'
|
||||
// @has - '//code' 'pub use foo::FooStruct as _;'
|
||||
// @!has - '//a[@href="struct._.html"]' ''
|
Loading…
Reference in New Issue
Block a user