2021-11-29 13:18:57 -06:00
|
|
|
#![feature(doc_notable_trait)]
|
|
|
|
|
|
|
|
#[doc(notable_trait)]
|
|
|
|
pub trait SomeTrait {}
|
|
|
|
|
|
|
|
pub struct SomeStruct;
|
|
|
|
pub struct OtherStruct;
|
|
|
|
impl SomeTrait for &[SomeStruct] {}
|
|
|
|
|
|
|
|
// @has doc_notable_trait_slice/fn.bare_fn_matches.html
|
2022-11-07 16:53:30 -06:00
|
|
|
// @snapshot bare_fn_matches - '//script[@id="notable-traits-data"]'
|
2021-11-29 13:18:57 -06:00
|
|
|
pub fn bare_fn_matches() -> &'static [SomeStruct] {
|
|
|
|
&[]
|
|
|
|
}
|
|
|
|
|
|
|
|
// @has doc_notable_trait_slice/fn.bare_fn_no_matches.html
|
2022-11-07 16:53:30 -06:00
|
|
|
// @count - '//script[@id="notable-traits-data"]' 0
|
2021-11-29 13:18:57 -06:00
|
|
|
pub fn bare_fn_no_matches() -> &'static [OtherStruct] {
|
|
|
|
&[]
|
|
|
|
}
|