Skip to content

Commit

Permalink
Add test for new DOM for empty impls
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Apr 27, 2021
1 parent 0db26d6 commit 982ef39
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/test/rustdoc/empty-impls.rs
@@ -0,0 +1,19 @@
#![crate_name = "foo"]

// @has foo/struct.Foo.html
// @has - '//div[@id="synthetic-implementations-list"]/h3[@id="impl-Send"]' 'impl Send for Foo'
pub struct Foo;

pub trait EmptyTrait {}

// @has - '//div[@id="trait-implementations-list"]/h3[@id="impl-EmptyTrait"]' 'impl EmptyTrait for Foo'
impl EmptyTrait for Foo {}

pub trait NotEmpty {
fn foo(&self);
}

// @has - '//div[@id="trait-implementations-list"]/details/summary/h3[@id="impl-NotEmpty"]' 'impl NotEmpty for Foo'
impl NotEmpty for Foo {
fn foo(&self) {}
}

0 comments on commit 982ef39

Please sign in to comment.