diff options
| author | bors <bors@rust-lang.org> | 2022-08-19 18:45:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-08-19 18:45:41 +0000 |
| commit | e1b28cd2f16bd5b832183d7968cae3bb9213e78d (patch) | |
| tree | c1c0b134e95cb9c2f80a95501c842318a6f7bb6f /src/test/rustdoc | |
| parent | 468887ef91e46847dff57b6b234cff0fad17cb71 (diff) | |
| parent | ecd2885eedd62dba3744b5e5a7051c7bb6e1eca9 (diff) | |
| download | rust-e1b28cd2f16bd5b832183d7968cae3bb9213e78d.tar.gz rust-e1b28cd2f16bd5b832183d7968cae3bb9213e78d.zip | |
Auto merge of #100740 - Dylan-DPC:rollup-0td6yq4, r=Dylan-DPC
Rollup of 9 pull requests Successful merges: - #99576 (Do not allow `Drop` impl on foreign fundamental types) - #100081 (never consider unsafe blocks unused if they would be required with deny(unsafe_op_in_unsafe_fn)) - #100208 (make NOP dyn casts not require anything about the vtable) - #100494 (Cleanup rustdoc themes) - #100522 (Only check the `DefId` for the recursion check in MIR inliner.) - #100592 (Manually implement Debug for ImportKind.) - #100598 (Don't fix builtin index when Where clause is found) - #100721 (Add diagnostics lints to `rustc_type_ir` module) - #100731 (rustdoc: count deref and non-deref as same set of used methods) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/issue-100679-sidebar-links-deref.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/test/rustdoc/issue-100679-sidebar-links-deref.rs b/src/test/rustdoc/issue-100679-sidebar-links-deref.rs new file mode 100644 index 00000000000..f09d2320609 --- /dev/null +++ b/src/test/rustdoc/issue-100679-sidebar-links-deref.rs @@ -0,0 +1,30 @@ +#![crate_name="foo"] + +pub struct Vec; + +pub struct Slice; + +impl std::ops::Deref for Vec { + type Target = Slice; + fn deref(&self) -> &Slice { + &Slice + } +} + +// @has foo/struct.Vec.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.is_empty"]' \ +// "is_empty" +impl Vec { + pub fn is_empty(&self) -> bool { + true + } +} + +// @has foo/struct.Vec.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.is_empty-1"]' \ +// "is_empty" +// @has foo/struct.Slice.html '//*[@class="sidebar-elems"]//section//li/a[@href="#method.is_empty"]' \ +// "is_empty" +impl Slice { + pub fn is_empty(&self) -> bool { + true + } +} |
