]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/doc-notable_trait-slice.rs
Rollup merge of #107819 - clubby789:x-py-root, r=jyn514
[rust.git] / tests / rustdoc / doc-notable_trait-slice.rs
1 #![feature(doc_notable_trait)]
2
3 #[doc(notable_trait)]
4 pub trait SomeTrait {}
5
6 pub struct SomeStruct;
7 pub struct OtherStruct;
8 impl SomeTrait for &[SomeStruct] {}
9
10 // @has doc_notable_trait_slice/fn.bare_fn_matches.html
11 // @snapshot bare_fn_matches - '//script[@id="notable-traits-data"]'
12 pub fn bare_fn_matches() -> &'static [SomeStruct] {
13     &[]
14 }
15
16 // @has doc_notable_trait_slice/fn.bare_fn_no_matches.html
17 // @count - '//script[@id="notable-traits-data"]' 0
18 pub fn bare_fn_no_matches() -> &'static [OtherStruct] {
19     &[]
20 }