Skip to content

Commit ab79f98

Browse files
committed
Auto merge of #164925 - GuillaumeGomez:cleanup-rustdoc-html-tests, r=<try>
Cleanup `rustdoc-html` tests try-job: test-x86_64-gnu-tools
2 parents 8592206 + f0fa4d1 commit ab79f98

7 files changed

Lines changed: 28 additions & 28 deletions

File tree

‎tests/rustdoc-html/impossible-default.rs‎

Lines changed: 0 additions & 28 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#![crate_name = "foo"]
2+
3+
// Check that default trait items that are impossible to satisfy are not
4+
// listed.
5+
6+
pub trait Foo {
7+
fn needs_sized(&self)
8+
where
9+
Self: Sized,
10+
{}
11+
12+
fn no_needs_sized(&self) {}
13+
}
14+
15+
//@ has 'foo/struct.Bar.html'
16+
// "fn needs_sized" should not be listed.
17+
//@ count - '//*[@id="trait-implementations-list"]//h4[@class="code-header"]' 1
18+
//@ has - '//*[@id="trait-implementations-list"]//h4[@class="code-header"]' "fn no_needs_sized"
19+
pub struct Bar([u8]);
20+
21+
impl Foo for Bar {}
22+
23+
//@ has 'foo/struct.Generic.html'
24+
//@ has - '//*[@id="method.needs_sized"]//h4[@class="code-header"]' "fn needs_sized"
25+
//@ has - '//*[@id="method.no_needs_sized"]//h4[@class="code-header"]' "fn no_needs_sized"
26+
pub struct Generic<T: ?Sized>(T);
27+
28+
impl<T: ?Sized> Foo for Generic<T> {}

0 commit comments

Comments
 (0)