From f605781406723269edb3826f58a6833c04e6305d Mon Sep 17 00:00:00 2001 From: U9G Date: Tue, 28 Nov 2023 00:08:18 -0500 Subject: [PATCH] add test for adding doc hidden to a now-private struct --- test_crates/struct_now_doc_hidden/new/src/lib.rs | 3 +++ test_crates/struct_now_doc_hidden/old/src/lib.rs | 2 ++ test_outputs/struct_missing.output.ron | 13 +++++++++++++ 3 files changed, 18 insertions(+) diff --git a/test_crates/struct_now_doc_hidden/new/src/lib.rs b/test_crates/struct_now_doc_hidden/new/src/lib.rs index 3f023cd5..069ae391 100644 --- a/test_crates/struct_now_doc_hidden/new/src/lib.rs +++ b/test_crates/struct_now_doc_hidden/new/src/lib.rs @@ -45,3 +45,6 @@ pub struct PublicStructHiddenField { #[doc(hidden)] pub my_field: i8, } + +#[doc(hidden)] +struct PublicStructThatGoesPrivate; diff --git a/test_crates/struct_now_doc_hidden/old/src/lib.rs b/test_crates/struct_now_doc_hidden/old/src/lib.rs index c93c032d..f39a217f 100644 --- a/test_crates/struct_now_doc_hidden/old/src/lib.rs +++ b/test_crates/struct_now_doc_hidden/old/src/lib.rs @@ -25,3 +25,5 @@ pub mod MyNestedPublicMod { pub struct MyStruct; } } + +pub struct PublicStructThatGoesPrivate; diff --git a/test_outputs/struct_missing.output.ron b/test_outputs/struct_missing.output.ron index 2641ab26..87652937 100644 --- a/test_outputs/struct_missing.output.ron +++ b/test_outputs/struct_missing.output.ron @@ -84,6 +84,19 @@ "visibility_limit": String("public"), }, ], + "./test_crates/struct_now_doc_hidden/": [ + { + "name": String("PublicStructThatGoesPrivate"), + "path": List([ + String("struct_now_doc_hidden"), + String("PublicStructThatGoesPrivate"), + ]), + "span_begin_line": Uint64(29), + "span_filename": String("src/lib.rs"), + "struct_type": String("unit"), + "visibility_limit": String("public"), + }, + ], "./test_crates/struct_pub_field_missing/": [ { "name": String("StructRemoved"),