Skip to content

Commit

Permalink
Rollup merge of #116432 - notriddle:master, r=fmease
Browse files Browse the repository at this point in the history
rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 2)

Follow up #116214
  • Loading branch information
workingjubilee authored Oct 5, 2023
2 parents d7b02c3 + a46ccd8 commit 4a14a80
Show file tree
Hide file tree
Showing 25 changed files with 68 additions and 8 deletions.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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

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

0 comments on commit 4a14a80

Please sign in to comment.