File tree 2 files changed +28
-1
lines changed
2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ pub trait AnotherTrait2 {}
62
62
63
63
// @has - '//pre[@class="rust"]//a[@href="#61"]' 'AnotherTrait2'
64
64
pub fn foo4 ( ) {
65
- let x: Vec < AnotherTrait2 > = Vec :: new ( ) ;
65
+ let x: Vec < & dyn AnotherTrait2 > = Vec :: new ( ) ;
66
66
}
67
67
68
68
// @has - '//pre[@class="rust"]//a[@href="../../foo/primitive.bool.html"]' 'bool'
Original file line number Diff line number Diff line change
1
+ // compile-flags: -Zunstable-options --generate-link-to-definition
2
+
3
+ #![ crate_name = "foo" ]
4
+
5
+ // @has 'src/foo/jump-to-def-doc-links-calls.rs.html'
6
+
7
+ // @has - '//a[@href="../../foo/struct.Bar.html"]' 'Bar'
8
+ pub struct Bar ;
9
+
10
+ impl std:: default:: Default for Bar {
11
+ // @has - '//a[@href="#20-22"]' 'Self::new'
12
+ fn default ( ) -> Self {
13
+ Self :: new ( )
14
+ }
15
+ }
16
+
17
+ // @has - '//a[@href="#8"]' 'Bar'
18
+ impl Bar {
19
+ // @has - '//a[@href="#24-26"]' 'Self::bar'
20
+ pub fn new ( ) -> Self {
21
+ Self :: bar ( )
22
+ }
23
+
24
+ pub fn bar ( ) -> Self {
25
+ Self
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments