Skip to content

Commit b5c9982

Browse files
committed
Add crate_name and URL to test cases
1 parent 139fb22 commit b5c9982

20 files changed

+95
-37
lines changed

tests/rustdoc/issue-35169-2.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// https://github.com/rust-lang/rust/issues/35169
2+
#![crate_name="foo"]
3+
14
use std::ops::Deref;
25
use std::ops::DerefMut;
36

@@ -23,7 +26,7 @@ impl DerefMut for Bar {
2326
fn deref_mut(&mut self) -> &mut Foo { loop {} }
2427
}
2528

26-
// @has issue_35169_2/struct.Bar.html
29+
// @has foo/struct.Bar.html
2730
// @has - '//*[@id="method.by_ref"]//h4[@class="code-header"]' 'fn by_ref(&self)'
2831
// @has - '//*[@id="method.by_ref"]' 'fn by_ref(&self)'
2932
// @has - '//*[@id="method.by_explicit_ref"]//h4[@class="code-header"]' 'fn by_explicit_ref(self: &Foo)'

tests/rustdoc/issue-35169.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// https://github.com/rust-lang/rust/issues/35169
2+
#![crate_name="foo"]
3+
14
use std::ops::Deref;
25

36
pub struct Foo;
@@ -18,7 +21,7 @@ impl Deref for Bar {
1821
fn deref(&self) -> &Foo { loop {} }
1922
}
2023

21-
// @has issue_35169/struct.Bar.html
24+
// @has foo/struct.Bar.html
2225
// @has - '//*[@id="method.by_ref"]//h4[@class="code-header"]' 'fn by_ref(&self)'
2326
// @has - '//*[@id="method.by_ref"]' 'fn by_ref(&self)'
2427
// @has - '//*[@id="method.by_explicit_ref"]//h4[@class="code-header"]' 'fn by_explicit_ref(self: &Foo)'

tests/rustdoc/issue-35488.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1+
// https://github.com/rust-lang/rust/issues/35488
2+
#![crate_name="foo"]
3+
14
mod foo {
25
pub enum Foo {
36
Bar,
47
}
58
pub use self::Foo::*;
69
}
710

8-
// @has 'issue_35488/index.html' '//code' 'pub use self::Foo::*;'
9-
// @has 'issue_35488/enum.Foo.html'
11+
// @has 'foo/index.html' '//code' 'pub use self::Foo::*;'
12+
// @has 'foo/enum.Foo.html'
1013
pub use self::foo::*;
1114

12-
// @has 'issue_35488/index.html' '//code' 'pub use std::option::Option::None;'
15+
// @has 'foo/index.html' '//code' 'pub use std::option::Option::None;'
1316
pub use std::option::Option::None;

tests/rustdoc/issue-41783.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
// @has issue_41783/struct.Foo.html
1+
// https://github.com/rust-lang/rust/issues/41783
2+
#![crate_name="foo"]
3+
4+
// @has foo/struct.Foo.html
25
// @!hasraw - 'space'
36
// @!hasraw - 'comment'
47
// @hasraw - '<span class="attr">#[outer]'

tests/rustdoc/issue-42760.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
// https://github.com/rust-lang/rust/issues/42760
2+
#![crate_name="foo"]
3+
14
#![allow(rustdoc::invalid_rust_codeblocks)]
25

3-
// @has issue_42760/struct.NonGen.html
6+
// @has foo/struct.NonGen.html
47
// @has - '//h2' 'Example'
58

69
/// Item docs.

tests/rustdoc/issue-43869.rs

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// https://github.com/rust-lang/rust/issues/43869
2+
#![crate_name="foo"]
3+
14
pub fn g() -> impl Iterator<Item=u8> {
25
Some(1u8).into_iter()
36
}
@@ -58,15 +61,15 @@ pub fn test_44731_4() -> Box<Iterator<Item=impl Clone>> {
5861
Box::new(g())
5962
}
6063

61-
// @has issue_43869/fn.g.html
62-
// @has issue_43869/fn.h.html
63-
// @has issue_43869/fn.i.html
64-
// @has issue_43869/fn.j.html
65-
// @has issue_43869/fn.k.html
66-
// @has issue_43869/fn.l.html
67-
// @has issue_43869/fn.m.html
68-
// @has issue_43869/fn.n.html
69-
// @has issue_43869/fn.o.html
70-
// @has issue_43869/fn.test_44731_0.html
71-
// @has issue_43869/fn.test_44731_1.html
72-
// @has issue_43869/fn.test_44731_4.html
64+
// @has foo/fn.g.html
65+
// @has foo/fn.h.html
66+
// @has foo/fn.i.html
67+
// @has foo/fn.j.html
68+
// @has foo/fn.k.html
69+
// @has foo/fn.l.html
70+
// @has foo/fn.m.html
71+
// @has foo/fn.n.html
72+
// @has foo/fn.o.html
73+
// @has foo/fn.test_44731_0.html
74+
// @has foo/fn.test_44731_1.html
75+
// @has foo/fn.test_44731_4.html

tests/rustdoc/issue-46377.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
// @has 'issue_46377/index.html' '//*[@class="desc docblock-short"]' 'Check out this struct!'
1+
// https://github.com/rust-lang/rust/issues/46377
2+
#![crate_name="foo"]
3+
4+
// @has 'foo/index.html' '//*[@class="desc docblock-short"]' 'Check out this struct!'
25
/// # Check out this struct!
36
pub struct SomeStruct;

tests/rustdoc/issue-46380-2.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
// https://github.com/rust-lang/rust/issues/46380
2+
#![crate_name="foo"]
3+
14
pub trait PublicTrait<T> {}
25

3-
// @has issue_46380_2/struct.PublicStruct.html
6+
// @has foo/struct.PublicStruct.html
47
pub struct PublicStruct;
58

69
// @!has - '//*[@class="impl"]' 'impl PublicTrait<PrivateStruct> for PublicStruct'

tests/rustdoc/issue-46727.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
// https://github.com/rust-lang/rust/issues/46727
2+
#![crate_name="foo"]
3+
14
// aux-build:issue-46727.rs
25

36
extern crate issue_46727;
47

5-
// @has issue_46727/trait.Foo.html
8+
// @has foo/trait.Foo.html
69
// @has - '//h3[@class="code-header"]' 'impl<T> Foo for Bar<[T; 3]>'
710
pub use issue_46727::{Foo, Bar};

tests/rustdoc/issue-47197-blank-line-in-doc-block.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
// @has issue_47197_blank_line_in_doc_block/fn.whose_woods_these_are_i_think_i_know.html
1+
// https://github.com/rust-lang/rust/issues/47197
2+
#![crate_name="foo"]
3+
4+
// @has foo/fn.whose_woods_these_are_i_think_i_know.html
25

36
/**
47
* snow

0 commit comments

Comments
 (0)