Skip to content

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

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

Merged
merged 3 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Add URL and crate_name to test cases
  • Loading branch information
notriddle committed Jul 13, 2024
commit 4d35754c46b4e0183770f4d7272b0e70a6553b19
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//@ build-aux-docs
//@ ignore-cross-compile

// https://github.com/rust-lang/rust/issues/100204
#![crate_name="second"]

extern crate first;
Expand Down
2 changes: 2 additions & 0 deletions tests/rustdoc/issue-100241.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// Check that this isn't an ICE
//@ should-fail

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

mod foo {
pub use inner::S;
//~^ ERROR unresolved imports `inner`, `foo::S`
Expand Down
2 changes: 2 additions & 0 deletions tests/rustdoc/issue-100620.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/100620

pub trait Bar<S> {}

pub trait Qux<T> {}
Expand Down
2 changes: 2 additions & 0 deletions tests/rustdoc/issue-102154.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/102154

trait A<Y, N> {
type B;
}
Expand Down
1 change: 1 addition & 0 deletions tests/rustdoc/issue-105735-overlapping-reexport-2.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Regression test to ensure that both `AtomicU8` items are displayed but not the re-export.
// https://github.com/rust-lang/rust/issues/105735

#![crate_name = "foo"]
#![no_std]
Expand Down
1 change: 1 addition & 0 deletions tests/rustdoc/issue-105735-overlapping-reexport.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Regression test to ensure that both `AtomicU8` items are displayed but not the re-export.
// https://github.com/rust-lang/rust/issues/105735

#![crate_name = "foo"]
#![no_std]
Expand Down
1 change: 1 addition & 0 deletions tests/rustdoc/issue-105952.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/105952
#![crate_name = "foo"]

#![feature(associated_const_equality)]
Expand Down
7 changes: 5 additions & 2 deletions tests/rustdoc/issue-106142.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
//@ has 'issue_106142/a/index.html'
//@ count 'issue_106142/a/index.html' '//ul[@class="item-table"]//li//a' 1
// https://github.com/rust-lang/rust/issues/106142
#![crate_name="foo"]

//@ has 'foo/a/index.html'
//@ count 'foo/a/index.html' '//ul[@class="item-table"]//li//a' 1

#![allow(rustdoc::broken_intra_doc_links)]

Expand Down
5 changes: 4 additions & 1 deletion tests/rustdoc/issue-106421-not-internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
//@ ignore-cross-compile
// This is the version where a non-compiler-internal crate inlines a compiler-internal one.
// In this case, the item shouldn't be documented, because regular users can't get at it.
// https://github.com/rust-lang/rust/issues/106421
#![crate_name="bar"]

extern crate foo;

//@ !has issue_106421_not_internal/struct.FatalError.html '//*[@id="method.raise"]' 'fn raise'
//@ !has bar/struct.FatalError.html '//*[@id="method.raise"]' 'fn raise'
pub use foo::FatalError;
4 changes: 3 additions & 1 deletion tests/rustdoc/issue-106421.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
//@ aux-build:issue-106421-force-unstable.rs
//@ ignore-cross-compile
//@ compile-flags: -Zforce-unstable-if-unmarked
// https://github.com/rust-lang/rust/issues/106421
#![crate_name="bar"]

extern crate foo;

//@ has issue_106421/struct.FatalError.html '//*[@id="method.raise"]' 'fn raise'
//@ has bar/struct.FatalError.html '//*[@id="method.raise"]' 'fn raise'
pub use foo::FatalError;
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//@ build-aux-docs
//@ ignore-cross-compile

// https://github.com/rust-lang/rust/issues/99221
#![crate_name = "foo"]

#[macro_use]
Expand Down
1 change: 1 addition & 0 deletions tests/rustdoc/issue-99221-multiple-structs-w-same-name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//@ build-aux-docs
//@ ignore-cross-compile

// https://github.com/rust-lang/rust/issues/99221
#![crate_name = "foo"]

#[macro_use]
Expand Down
1 change: 1 addition & 0 deletions tests/rustdoc/issue-99734-multiple-foreigns-w-same-name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//@ build-aux-docs
//@ ignore-cross-compile

// https://github.com/rust-lang/rust/issues/99734
#![crate_name = "foo"]

#[macro_use]
Expand Down
1 change: 1 addition & 0 deletions tests/rustdoc/issue-99734-multiple-mods-w-same-name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//@ build-aux-docs
//@ ignore-cross-compile

// https://github.com/rust-lang/rust/issues/99734
#![crate_name = "foo"]

#[macro_use]
Expand Down