]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/doc-notable_trait-mut_t_is_not_an_iterator.rs
Migrate `rustc_parse` to derive diagnostics
[rust.git] / tests / rustdoc / doc-notable_trait-mut_t_is_not_an_iterator.rs
1 //! Test case for [#80737].
2 //!
3 //! A SomeTrait that is implemented for `&mut T where T: SomeTrait`
4 //! should not be marked as "notable" for return values that do not
5 //! have bounds on the trait itself.
6 //!
7 //! [#80737]: https://github.com/rust-lang/rust/issues/80737
8
9 #![feature(rustdoc_internals)]
10 #![no_std]
11
12 #[doc(primitive = "reference")]
13 /// Some useless docs, wouhou!
14 ///
15 /// We need to put this in here, because notable traits
16 /// that are implemented on foreign types don't show up.
17 mod reference {}
18
19 // @has doc_notable_trait_mut_t_is_not_an_iterator/fn.fn_no_matches.html
20 // @!has - '//code[@class="content"]' 'Iterator'
21 pub fn fn_no_matches<'a, T: 'a>() -> &'a mut T {
22     panic!()
23 }