Auto merge of #118105 - notriddle:master, r=fmease
rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 4) 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
This commit is contained in:
commit
eab8c7d5fd
32 changed files with 61 additions and 20 deletions
4
tests/rustdoc-ui/apit-46976.rs
Normal file
4
tests/rustdoc-ui/apit-46976.rs
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
// check-pass
|
||||||
|
// https://github.com/rust-lang/rust/issues/46976
|
||||||
|
|
||||||
|
pub fn ice(f: impl Fn()) {}
|
|
@ -1,4 +1,7 @@
|
||||||
// aux-build:issue-48414.rs
|
// aux-build:issue-48414.rs
|
||||||
|
// check-pass
|
||||||
|
|
||||||
|
// https://github.com/rust-lang/rust/issues/48414
|
||||||
|
|
||||||
// ICE when resolving paths for a trait that linked to another trait, when both were in an external
|
// ICE when resolving paths for a trait that linked to another trait, when both were in an external
|
||||||
// crate
|
// crate
|
|
@ -1,3 +1,6 @@
|
||||||
|
// check-pass
|
||||||
|
// https://github.com/rust-lang/rust/issues/34423
|
||||||
|
|
||||||
pub struct Foo;
|
pub struct Foo;
|
||||||
|
|
||||||
pub trait Bar {
|
pub trait Bar {
|
|
@ -1,7 +1,10 @@
|
||||||
// aux-build:issue-36031.rs
|
// aux-build:issue-36031.rs
|
||||||
|
// check-pass
|
||||||
// build-aux-docs
|
// build-aux-docs
|
||||||
// ignore-cross-compile
|
// ignore-cross-compile
|
||||||
|
|
||||||
|
// https://github.com/rust-lang/rust/issues/36031
|
||||||
|
|
||||||
#![crate_name = "foo"]
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
extern crate issue_36031;
|
extern crate issue_36031;
|
|
@ -1,5 +1,8 @@
|
||||||
|
// check-pass
|
||||||
// hopefully this doesn't cause an ICE
|
// hopefully this doesn't cause an ICE
|
||||||
|
|
||||||
|
// https://github.com/rust-lang/rust/issues/46271
|
||||||
|
|
||||||
pub fn foo() {
|
pub fn foo() {
|
||||||
extern crate std;
|
extern crate std;
|
||||||
}
|
}
|
|
@ -1,4 +1,7 @@
|
||||||
|
// check-pass
|
||||||
// This should not ICE
|
// This should not ICE
|
||||||
|
|
||||||
|
// https://github.com/rust-lang/rust/issues/47639
|
||||||
pub fn test() {
|
pub fn test() {
|
||||||
macro_rules! foo {
|
macro_rules! foo {
|
||||||
() => ()
|
() => ()
|
|
@ -1,6 +1,9 @@
|
||||||
// aux-build:issue-40936.rs
|
// aux-build:issue-40936.rs
|
||||||
|
// check-pass
|
||||||
// build-aux-docs
|
// build-aux-docs
|
||||||
|
|
||||||
|
// https://github.com/rust-lang/rust/issues/40936
|
||||||
|
|
||||||
#![crate_name = "foo"]
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
extern crate issue_40936;
|
extern crate issue_40936;
|
1
tests/rustdoc/doctest/auxiliary/empty.rs
Normal file
1
tests/rustdoc/doctest/auxiliary/empty.rs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
// intentionally empty
|
|
@ -1,3 +1,5 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/43153
|
||||||
|
|
||||||
// Test that `include!` in a doc test searches relative to the directory in
|
// Test that `include!` in a doc test searches relative to the directory in
|
||||||
// which the test is declared.
|
// which the test is declared.
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/38219
|
||||||
|
|
||||||
// compile-flags:--test
|
// compile-flags:--test
|
||||||
// should-fail
|
// should-fail
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
// compile-flags:--test
|
// compile-flags:--test
|
||||||
|
|
||||||
|
// https://github.com/rust-lang/rust/issues/48377
|
||||||
|
|
||||||
//! This is a doc comment
|
//! This is a doc comment
|
||||||
//!
|
//!
|
||||||
//! ```rust
|
//! ```rust
|
|
@ -1,3 +1,4 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/46767
|
||||||
#![crate_name = "foo"]
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
mod private {
|
mod private {
|
|
@ -1,3 +1,4 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/43701
|
||||||
#![crate_name = "foo"]
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
pub use std::vec::Vec;
|
pub use std::vec::Vec;
|
|
@ -1,5 +1,7 @@
|
||||||
#![crate_name = "foo"]
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
|
// https://github.com/rust-lang/rust/issues/34473
|
||||||
|
|
||||||
mod second {
|
mod second {
|
||||||
pub struct SomeTypeWithLongName;
|
pub struct SomeTypeWithLongName;
|
||||||
}
|
}
|
|
@ -1,3 +1,4 @@
|
||||||
|
// https://github.com/rust-lang/rust/issues/46766
|
||||||
#![crate_name = "foo"]
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
pub enum Enum{Variant}
|
pub enum Enum{Variant}
|
|
@ -1,19 +0,0 @@
|
||||||
// ignore-cross-compile
|
|
||||||
|
|
||||||
#![crate_name = "foo"]
|
|
||||||
|
|
||||||
pub trait SomeTrait {}
|
|
||||||
pub struct SomeStruct;
|
|
||||||
|
|
||||||
// @has foo/trait.SomeTrait.html '//a/@href' '../src/foo/issue-43893.rs.html#9'
|
|
||||||
impl SomeTrait for usize {}
|
|
||||||
|
|
||||||
// @has foo/trait.SomeTrait.html '//a/@href' '../src/foo/issue-43893.rs.html#12-14'
|
|
||||||
impl SomeTrait for SomeStruct {
|
|
||||||
// deliberately multi-line impl
|
|
||||||
}
|
|
||||||
|
|
||||||
pub trait AnotherTrait {}
|
|
||||||
|
|
||||||
// @has foo/trait.AnotherTrait.html '//a/@href' '../src/foo/issue-43893.rs.html#19'
|
|
||||||
impl<T> AnotherTrait for T {}
|
|
|
@ -1 +0,0 @@
|
||||||
pub fn ice(f: impl Fn()) {}
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
#![crate_name = "foo"]
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
|
// https://github.com/rust-lang/rust/issues/47038
|
||||||
|
|
||||||
use std::vec;
|
use std::vec;
|
||||||
|
|
||||||
// @has 'foo/index.html'
|
// @has 'foo/index.html'
|
21
tests/rustdoc/src-links-implementor-43893.rs
Normal file
21
tests/rustdoc/src-links-implementor-43893.rs
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
// ignore-cross-compile
|
||||||
|
|
||||||
|
// https://github.com/rust-lang/rust/issues/43893
|
||||||
|
|
||||||
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
|
pub trait SomeTrait {}
|
||||||
|
pub struct SomeStruct;
|
||||||
|
|
||||||
|
// @has foo/trait.SomeTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#11'
|
||||||
|
impl SomeTrait for usize {}
|
||||||
|
|
||||||
|
// @has foo/trait.SomeTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#14-16'
|
||||||
|
impl SomeTrait for SomeStruct {
|
||||||
|
// deliberately multi-line impl
|
||||||
|
}
|
||||||
|
|
||||||
|
pub trait AnotherTrait {}
|
||||||
|
|
||||||
|
// @has foo/trait.AnotherTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#21'
|
||||||
|
impl<T> AnotherTrait for T {}
|
|
@ -1,5 +1,7 @@
|
||||||
#![crate_name = "foo"]
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
|
// https://github.com/rust-lang/rust/issues/45584
|
||||||
|
|
||||||
pub trait Bar<T, U> {}
|
pub trait Bar<T, U> {}
|
||||||
|
|
||||||
// @has 'foo/struct.Foo1.html'
|
// @has 'foo/struct.Foo1.html'
|
|
@ -1,5 +1,7 @@
|
||||||
#![crate_name = "foo"]
|
#![crate_name = "foo"]
|
||||||
|
|
||||||
|
// https://github.com/rust-lang/rust/issues/34928
|
||||||
|
|
||||||
pub trait Bar {}
|
pub trait Bar {}
|
||||||
|
|
||||||
// @has foo/struct.Foo.html '//pre' 'pub struct Foo<T>(pub T) where T: Bar;'
|
// @has foo/struct.Foo.html '//pre' 'pub struct Foo<T>(pub T) where T: Bar;'
|
Loading…
Add table
Reference in a new issue