rustdoc: Do not filter out Self: Sized bounds
This commit is contained in:
parent
e94827e5b0
commit
f543770de2
4 changed files with 56 additions and 18 deletions
14
src/test/rustdoc/inline_cross/auxiliary/issue-24183.rs
Normal file
14
src/test/rustdoc/inline_cross/auxiliary/issue-24183.rs
Normal 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 {}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<h4 class="code-header">fn <a href="#method.touch" class="fnname">touch</a>(&self)</h4>
|
||||
18
src/test/rustdoc/inline_cross/issue-24183.rs
Normal file
18
src/test/rustdoc/inline_cross/issue-24183.rs
Normal 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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue