Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4d2dda4

Browse files
committedFeb 15, 2025
make test a bit more explicit in what it checks
1 parent 2a77167 commit 4d2dda4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
 

‎tests/rustdoc/anchor-id-duplicate-method-name-25001.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pub struct Foo<T>(T);
77
pub trait Bar {
88
type Item;
99

10-
fn quux(self);
10+
fn quux(self) -> Self::Item;
1111
}
1212

1313
impl Foo<u8> {
@@ -27,20 +27,20 @@ impl<T> Bar for Foo<T> {
2727
//@ has - '//*[@id="associatedtype.Item"]//h4[@class="code-header"]' 'type Item = T'
2828
type Item=T;
2929

30-
//@ has - '//*[@id="method.quux"]//h4[@class="code-header"]' 'fn quux(self)'
31-
fn quux(self) {}
30+
//@ has - '//*[@id="method.quux"]//h4[@class="code-header"]' 'fn quux(self) -> T'
31+
fn quux(self) -> T {}
3232
}
3333
impl<'a, T> Bar for &'a Foo<T> {
3434
//@ has - '//*[@id="associatedtype.Item-1"]//h4[@class="code-header"]' "type Item = &'a T"
3535
type Item=&'a T;
3636

37-
//@ has - '//*[@id="method.quux-1"]//h4[@class="code-header"]' 'fn quux(self)'
38-
fn quux(self) {}
37+
//@ has - '//*[@id="method.quux-1"]//h4[@class="code-header"]' "fn quux(self) -> &'a T"
38+
fn quux(self) -> &'a T {}
3939
}
4040
impl<'a, T> Bar for &'a mut Foo<T> {
4141
//@ has - '//*[@id="associatedtype.Item-2"]//h4[@class="code-header"]' "type Item = &'a mut T"
4242
type Item=&'a mut T;
4343

44-
//@ has - '//*[@id="method.quux-2"]//h4[@class="code-header"]' 'fn quux(self)'
45-
fn quux(self) {}
44+
//@ has - '//*[@id="method.quux-2"]//h4[@class="code-header"]' "fn quux(self) -> &'a mut T"
45+
fn quux(self) -> &'a mut T {}
4646
}

0 commit comments

Comments
 (0)
Please sign in to comment.