Skip to content

Commit

Permalink
(rustdoc) fix test for trait impl display
Browse files Browse the repository at this point in the history
  • Loading branch information
liketechnik committed Oct 25, 2020
1 parent f392479 commit 251f6da
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/test/rustdoc/impl-everywhere.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ pub struct Bar;
impl Foo for Bar {}
impl Foo2 for Bar {}

// @!has foo/fn.foo.html '//section[@id="main"]//pre' "x: &\'x impl Foo"
// @!has foo/fn.foo.html '//section[@id="main"]//pre' "-> &\'x impl Foo {"
// @has foo/fn.foo.html '//section[@id="main"]//pre' "x: &'x impl Foo"
// @has foo/fn.foo.html '//section[@id="main"]//pre' "-> &'x impl Foo"
pub fn foo<'x>(x: &'x impl Foo) -> &'x impl Foo {
x
}

// @!has foo/fn.foo2.html '//section[@id="main"]//pre' "x: &\'x impl Foo"
// @!has foo/fn.foo2.html '//section[@id="main"]//pre' '-> impl Foo2 {'
// @has foo/fn.foo2.html '//section[@id="main"]//pre' "x: &'x impl Foo"
// @has foo/fn.foo2.html '//section[@id="main"]//pre' '-> impl Foo2'
pub fn foo2<'x>(_x: &'x impl Foo) -> impl Foo2 {
Bar
}

// @!has foo/fn.foo_foo.html '//section[@id="main"]//pre' '-> impl Foo + Foo2 {'
// @has foo/fn.foo_foo.html '//section[@id="main"]//pre' '-> impl Foo + Foo2'
pub fn foo_foo() -> impl Foo + Foo2 {
Bar
}

// @!has foo/fn.foo2.html '//section[@id="main"]//pre' "x: &'x (impl Foo + Foo2)"
// @has foo/fn.foo_foo_foo.html '//section[@id="main"]//pre' "x: &'x impl Foo + Foo2"
pub fn foo_foo_foo<'x>(_x: &'x (impl Foo + Foo2)) {
}

0 comments on commit 251f6da

Please sign in to comment.