diff options
| author | León Orell Valerian Liehr <liehr.exchange@gmx.net> | 2022-10-19 17:27:08 +0200 |
|---|---|---|
| committer | León Orell Valerian Liehr <liehr.exchange@gmx.net> | 2022-10-19 17:27:08 +0200 |
| commit | f543770de26849fee46d7974ba9212e402c22151 (patch) | |
| tree | 0ed4f6e42426b1db87892ea02d88e4e96796770b /src/test/rustdoc/inline_cross | |
| parent | e94827e5b09b5b098ea10d0c57a84892fc73b5a7 (diff) | |
| download | rust-f543770de26849fee46d7974ba9212e402c22151.tar.gz rust-f543770de26849fee46d7974ba9212e402c22151.zip | |
rustdoc: Do not filter out `Self: Sized` bounds
Diffstat (limited to 'src/test/rustdoc/inline_cross')
3 files changed, 33 insertions, 0 deletions
diff --git a/src/test/rustdoc/inline_cross/auxiliary/issue-24183.rs b/src/test/rustdoc/inline_cross/auxiliary/issue-24183.rs new file mode 100644 index 00000000000..e7a13acc6f8 --- /dev/null +++ b/src/test/rustdoc/inline_cross/auxiliary/issue-24183.rs @@ -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 {} diff --git a/src/test/rustdoc/inline_cross/issue-24183.method_no_where_self_sized.html b/src/test/rustdoc/inline_cross/issue-24183.method_no_where_self_sized.html new file mode 100644 index 00000000000..6955a961499 --- /dev/null +++ b/src/test/rustdoc/inline_cross/issue-24183.method_no_where_self_sized.html @@ -0,0 +1 @@ +<h4 class="code-header">fn <a href="#method.touch" class="fnname">touch</a>(&self)</h4> \ No newline at end of file diff --git a/src/test/rustdoc/inline_cross/issue-24183.rs b/src/test/rustdoc/inline_cross/issue-24183.rs new file mode 100644 index 00000000000..d11b6955f3c --- /dev/null +++ b/src/test/rustdoc/inline_cross/issue-24183.rs @@ -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; |
