Skip to content

Commit 5dec013

Browse files
authored
Rollup merge of #91748 - notriddle:notriddle/doc-notable_trait-mut_t_is_not_an_iterator, r=Mark-Simulacrum
rustdoc: Add regression test for Iterator as notable trait on &mut T Closes #80737
2 parents 0f3a4c7 + 17206cb commit 5dec013

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
}

0 commit comments

Comments
 (0)