diff options
author | bors <bors@rust-lang.org> | 2023-05-17 15:17:13 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2023-05-17 15:17:13 +0000 |
commit | ad23942ad4079f779651983b262fa34c0beda701 (patch) | |
tree | c531783a8a7eecefef323d6a2fe2a3bd22d363ea /tests/rustdoc-json/impls/impl_item_visibility_show_private.rs | |
parent | c2ccc855e74aec03e434405eca3c247ee2432e53 (diff) | |
parent | b0d92c2b7060cf434fcc738b3fabf69410244cd3 (diff) | |
download | rust-ad23942ad4079f779651983b262fa34c0beda701.tar.gz |
Auto merge of #111680 - Dylan-DPC:rollup-1p45gxt, r=Dylan-DPC
Rollup of 6 pull requests
Successful merges:
- #110930 (Don't expect normalization to succeed in elaborate_drops)
- #111557 (Revert "Validate resolution for SelfCtor too.")
- #111565 (rustdoc-json: Add tests for visibility of impls)
- #111588 (Emits E0599 when meeting `MyTrait::missing_method`)
- #111625 (Move rustc_middle/src/ty/query.rs to rustc_middle/src/query/plumbing.rs)
- #111674 (Add missing backslash in HTML string)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests/rustdoc-json/impls/impl_item_visibility_show_private.rs')
-rw-r--r-- | tests/rustdoc-json/impls/impl_item_visibility_show_private.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs b/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs new file mode 100644 index 00000000000..b98d1e4167c --- /dev/null +++ b/tests/rustdoc-json/impls/impl_item_visibility_show_private.rs @@ -0,0 +1,27 @@ +// compile-flags: --document-private-items +#![feature(no_core)] +#![no_core] + +pub struct Foo; + +/// impl Foo priv +impl Foo { + fn baz() {} +} +// @is '$.index[*][?(@.docs=="impl Foo priv")].visibility' '"default"' + + +/// impl Foo pub +impl Foo { + pub fn qux() {} +} +// @is '$.index[*][?(@.docs=="impl Foo pub")].visibility' '"default"' + + +/// impl Foo hidden +impl Foo { + #[doc(hidden)] + pub fn __quazl(){} +} +// FIXME(#111564): Is this the right behaviour? +// @is '$.index[*][?(@.docs=="impl Foo hidden")].visibility' '"default"' |