rustdoc: Do not filter out Self: Sized bounds

This commit is contained in:
León Orell Valerian Liehr 2022-10-19 17:27:08 +02:00
parent e94827e5b0
commit f543770de2
No known key found for this signature in database
GPG key ID: CD75E31CE2CFD7D9
4 changed files with 56 additions and 18 deletions

View file

@ -0,0 +1,14 @@
#![crate_type = "lib"]
pub trait U/*: ?Sized */ {
fn modified(self) -> Self
where
Self: Sized
{
self
}
fn touch(&self)/* where Self: ?Sized */{}
}
pub trait S: Sized {}

View file

@ -0,0 +1 @@
<h4 class="code-header">fn <a href="#method.touch" class="fnname">touch</a>(&amp;self)</h4>

View file

@ -0,0 +1,18 @@
#![crate_type = "lib"]
#![crate_name = "usr"]
// aux-crate:issue_24183=issue-24183.rs
// edition: 2021
// @has usr/trait.U.html
// @has - '//*[@class="item-decl"]' "pub trait U {"
// @has - '//*[@id="method.modified"]' \
// "fn modified(self) -> Self\
// where \
// Self: Sized"
// @snapshot method_no_where_self_sized - '//*[@id="method.touch"]/*[@class="code-header"]'
pub use issue_24183::U;
// @has usr/trait.S.html
// @has - '//*[@class="item-decl"]' 'pub trait S: Sized {'
pub use issue_24183::S;