Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc: rename issue-\d+.rs tests to have meaningful names (part 4) #118105

Merged
merged 5 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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
// which the test is declared.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/38219

// compile-flags:--test
// should-fail

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// compile-flags:--test

// https://github.com/rust-lang/rust/issues/48377

//! This is a doc comment
//!
//! ```rust
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/46767
#![crate_name = "foo"]

mod private {
Expand Down
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could theoretically be moved into inline_local/.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/46766
#![crate_name = "foo"]

pub enum Enum{Variant}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/43701
#![crate_name = "foo"]

pub use std::vec::Vec;
Expand Down
2 changes: 2 additions & 0 deletions tests/rustdoc/issue-34423.rs → tests/rustdoc/ice-34423.rs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preexisting: This would be a better fit for rustdoc-ui/. We could also name it hidden-trait-method-34423.rs? (Nowadays, the bar in the impl is stripped anyways since it inherits the doc(hidden) from the corresp. trait item and the original code path is no longer exercised.)

Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/34423

pub struct Foo;

pub trait Bar {
Expand Down
2 changes: 2 additions & 0 deletions tests/rustdoc/issue-36031.rs → tests/rustdoc/ice-36031.rs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rustdoc-ui/? → inherent-assoc-consts-36031.rs?

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// build-aux-docs
// ignore-cross-compile

// https://github.com/rust-lang/rust/issues/36031

#![crate_name = "foo"]

extern crate issue_36031;
Expand Down
3 changes: 3 additions & 0 deletions tests/rustdoc/ice-apit-46976.rs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rustdoc-ui/? → apit-46976.rs? ice- isn't super meaningful.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// https://github.com/rust-lang/rust/issues/46976

pub fn ice(f: impl Fn()) {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intra-doc/ & dropping ice-?

Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// aux-build:issue-48414.rs

// 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
// crate

Expand Down
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rustdoc-ui/? → super-glob-40936.rs?

Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// aux-build:issue-40936.rs
// build-aux-docs

// https://github.com/rust-lang/rust/issues/40936

#![crate_name = "foo"]

extern crate issue_40936;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rustdoc-ui/?

Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// hopefully this doesn't cause an ICE

// https://github.com/rust-lang/rust/issues/46271

pub fn foo() {
extern crate std;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rustdoc-ui/?

Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// This should not ICE

// https://github.com/rust-lang/rust/issues/47639
pub fn test() {
macro_rules! foo {
() => ()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#![crate_name = "foo"]

// https://github.com/rust-lang/rust/issues/34473

mod second {
pub struct SomeTypeWithLongName;
}
Expand Down
19 changes: 0 additions & 19 deletions tests/rustdoc/issue-43893.rs

This file was deleted.

1 change: 0 additions & 1 deletion tests/rustdoc/issue-46976.rs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

#![crate_name = "foo"]

// https://github.com/rust-lang/rust/issues/47038

use std::vec;

// @has 'foo/index.html'
Expand Down
21 changes: 21 additions & 0 deletions tests/rustdoc/src-links-implementor-43893.rs
Original file line number Diff line number Diff line change
@@ -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 {}
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#![crate_name = "foo"]

// https://github.com/rust-lang/rust/issues/45584

pub trait Bar<T, U> {}

// @has 'foo/struct.Foo1.html'
Expand Down
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tuple-struct-with-where-clause-34928.rs?

Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#![crate_name = "foo"]

// https://github.com/rust-lang/rust/issues/34928

pub trait Bar {}

// @has foo/struct.Foo.html '//pre' 'pub struct Foo<T>(pub T) where T: Bar;'
Expand Down
Loading