File tree 2 files changed +43
-0
lines changed
src/test/rustdoc/inline_cross
2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ pub mod my_trait {
2
+ pub trait MyTrait {
3
+ fn my_fn ( & self ) -> Self ;
4
+ }
5
+ }
6
+
7
+ pub mod prelude {
8
+ #[ doc( inline) ]
9
+ pub use crate :: my_trait:: MyTrait ;
10
+ }
11
+
12
+ pub struct SomeStruct ;
13
+
14
+ impl my_trait:: MyTrait for SomeStruct {
15
+ fn my_fn ( & self ) -> SomeStruct {
16
+ SomeStruct
17
+ }
18
+ }
Original file line number Diff line number Diff line change
1
+ // aux-build:implementors_inline.rs
2
+ // build-aux-docs
3
+ // ignore-cross-compile
4
+
5
+ extern crate implementors_inline;
6
+
7
+ // @!has implementors/implementors_js/trait.MyTrait.js
8
+ // @has implementors/implementors_inline/my_trait/trait.MyTrait.js
9
+ // @!has implementors/implementors_inline/prelude/trait.MyTrait.js
10
+ // @has implementors_inline/my_trait/trait.MyTrait.html
11
+ // @has - '//script/@src' '../../implementors/implementors_inline/my_trait/trait.MyTrait.js'
12
+ // @has implementors_js/trait.MyTrait.html
13
+ // @has - '//script/@src' '../implementors/implementors_inline/my_trait/trait.MyTrait.js'
14
+ /// When re-exporting this trait, the HTML will be inlined,
15
+ /// but, vitally, the JavaScript will be located only at the
16
+ /// one canonical path.
17
+ pub use implementors_inline:: prelude:: MyTrait ;
18
+
19
+ pub struct OtherStruct ;
20
+
21
+ impl MyTrait for OtherStruct {
22
+ fn my_fn ( & self ) -> OtherStruct {
23
+ OtherStruct
24
+ }
25
+ }
You can’t perform that action at this time.
0 commit comments