]> git.proxmox.com Git - rustc.git/blame - src/test/rustdoc/doc-notable_trait-slice.rs
Update upstream source from tag 'upstream/1.60.0+dfsg1'
[rustc.git] / src / test / rustdoc / doc-notable_trait-slice.rs
CommitLineData
a2a8927a
XL
1#![feature(doc_notable_trait)]
2
3#[doc(notable_trait)]
4pub trait SomeTrait {}
5
6pub struct SomeStruct;
7pub struct OtherStruct;
8impl SomeTrait for &[SomeStruct] {}
9
10// @has doc_notable_trait_slice/fn.bare_fn_matches.html
11// @has - '//code[@class="content"]' 'impl SomeTrait for &[SomeStruct]'
12pub fn bare_fn_matches() -> &'static [SomeStruct] {
13 &[]
14}
15
16// @has doc_notable_trait_slice/fn.bare_fn_no_matches.html
17// @!has - '//code[@class="content"]' 'impl SomeTrait for &[SomeStruct]'
18pub fn bare_fn_no_matches() -> &'static [OtherStruct] {
19 &[]
20}