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 2) #116432

Merged
merged 3 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all 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,6 @@
// https://github.com/rust-lang/rust/issues/25001
#![crate_name="issue_25001"]

// @has issue_25001/struct.Foo.html
pub struct Foo<T>(T);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// https://github.com/rust-lang/rust/issues/28478
#![crate_name="issue_28478"]

#![feature(associated_type_defaults)]

// @has issue_28478/trait.Bar.html
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// https://github.com/rust-lang/rust/issues/21474
#![crate_name="issue_21474"]

pub use inner::*;

mod inner {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// aux-build:issue-22025.rs
// ignore-cross-compile

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

extern crate issue_22025;

pub use issue_22025::foo::{Foo, Bar};
10 changes: 10 additions & 0 deletions tests/rustdoc/doctest-hide-empty-line-23106.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// compile-flags:--test

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

/// ```
/// #
/// ```
pub fn main() {
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// compile-flags:--test

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

/// Example of rustdoc incorrectly parsing <code>```rust,should_panic</code>.
///
/// ```should_panic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// compile-flags:--test

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

/// ```
/// let a = r#"
/// foo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// https://github.com/rust-lang/rust/issues/22038
#![crate_name="issue_22038"]

extern "C" {
// @has issue_22038/fn.foo1.html \
// '//pre[@class="rust item-decl"]' 'pub unsafe extern "C" fn foo1()'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
// aux-build:issue-28927-1.rs
// ignore-cross-compile

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

pub extern crate issue_28927_1 as inner1;
pub use inner1 as foo;
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// aux-build:issue-21092.rs
// ignore-cross-compile

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

extern crate issue_21092;

// @has issue_21092/struct.Bar.html
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// aux-build:issue-27362-aux.rs
// ignore-cross-compile

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

extern crate issue_27362_aux;

pub use issue_27362_aux::*;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// aux-build:issue-23207-2.rs
// ignore-cross-compile

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

extern crate issue_23207_2;

// @has issue_23207/fmt/index.html
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// aux-build:issue-21801.rs
// ignore-cross-compile

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

extern crate issue_21801;

// @has issue_21801/struct.Foo.html
Expand Down
7 changes: 0 additions & 7 deletions tests/rustdoc/issue-23106.rs
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed doctest-hide-empty-line-23106.rs

If you review commit-by-commit, it shows what actually happened (and git blame seems to be able to follow it, too), but the PR Files tab is buggy here.

This file was deleted.

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

macro_rules! doc {
(#[$outer:meta] mod $i:ident { #![$inner:meta] }) =>
(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// https://github.com/rust-lang/rust/issues/27862
#![crate_name="issue_27862"]

/// Tests | Table
/// ------|-------------
/// t = b | id = \|x\| x
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#![feature(rustdoc_internals)]
#![no_std]

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

pub mod str {
#![rustc_doc_primitive = "str"]

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

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

// @has issue_26606_macro/macro.make_item.html
#[macro_use]
extern crate issue_26606_macro;

// @has issue_26606/constant.FOO.html
// @has - '//a[@href="../src/issue_26606/issue-26606.rs.html#11"]' 'source'
// @has - '//a[@href="../src/issue_26606/src-link-external-macro-26606.rs.html#14"]' 'source'
make_item!(FOO);
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// ignore-windows
// compile-flags: --no-defaults

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

// @has src/issue_26995/dev/null.html
// @has issue_26995/null/index.html '//a/@href' '../../src/issue_26995/dev/null.html'
#[path="/dev/null"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// https://github.com/rust-lang/rust/issues/27759
#![crate_name="issue_27759"]

#![feature(staged_api)]
#![doc(issue_tracker_base_url = "http://issue_url/")]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// aux-build:empty.rs
// ignore-cross-compile

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

// @has issue_27104/index.html
// @!hasraw - 'extern crate std'
// @!hasraw - 'use std::prelude::'
Expand Down
Loading