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
This commit is contained in:
commit
5dec0139f9
1 changed files with 23 additions and 0 deletions
|
@ -0,0 +1,23 @@
|
|||
//! Test case for [#80737].
|
||||
//!
|
||||
//! A SomeTrait that is implemented for `&mut T where T: SomeTrait`
|
||||
//! should not be marked as "notable" for return values that do not
|
||||
//! have bounds on the trait itself.
|
||||
//!
|
||||
//! [#80737]: https://github.com/rust-lang/rust/issues/80737
|
||||
|
||||
#![feature(rustdoc_internals)]
|
||||
#![no_std]
|
||||
|
||||
#[doc(primitive = "reference")]
|
||||
/// Some useless docs, wouhou!
|
||||
///
|
||||
/// We need to put this in here, because notable traits
|
||||
/// that are implemented on foreign types don't show up.
|
||||
mod reference {}
|
||||
|
||||
// @has doc_notable_trait_mut_t_is_not_an_iterator/fn.fn_no_matches.html
|
||||
// @!has - '//code[@class="content"]' 'Iterator'
|
||||
pub fn fn_no_matches<'a, T: 'a>() -> &'a mut T {
|
||||
panic!()
|
||||
}
|
Loading…
Add table
Reference in a new issue