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] {}
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has doc_notable_trait_slice/fn.bare_fn_matches.html
|
|
|
|
//@ snapshot bare_fn_matches - '//script[@id="notable-traits-data"]'
|
2021-11-29 13:18:57 -06:00
|
|
|
pub fn bare_fn_matches() -> &'static [SomeStruct] {
|
|
|
|
&[]
|
|
|
|
}
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has doc_notable_trait_slice/fn.bare_fn_no_matches.html
|
|
|
|
//@ count - '//script[@id="notable-traits-data"]' 0
|
2021-11-29 13:18:57 -06:00
|
|
|
pub fn bare_fn_no_matches() -> &'static [OtherStruct] {
|
|
|
|
&[]
|
|
|
|
}
|
2023-03-09 14:41:13 -06:00
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has doc_notable_trait_slice/fn.bare_fn_mut_no_matches.html
|
|
|
|
//@ count - '//script[@id="notable-traits-data"]' 0
|
2023-03-09 14:41:13 -06:00
|
|
|
pub fn bare_fn_mut_no_matches() -> &'static mut [SomeStruct] {
|
|
|
|
&mut []
|
|
|
|
}
|