Skip to content

Commit

Permalink
add test for adding doc hidden to a now-private struct
Browse files Browse the repository at this point in the history
  • Loading branch information
u9g committed Nov 28, 2023
1 parent bc0de14 commit f605781
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test_crates/struct_now_doc_hidden/new/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ pub struct PublicStructHiddenField {
#[doc(hidden)]
pub my_field: i8,
}

#[doc(hidden)]
struct PublicStructThatGoesPrivate;
2 changes: 2 additions & 0 deletions test_crates/struct_now_doc_hidden/old/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ pub mod MyNestedPublicMod {
pub struct MyStruct;
}
}

pub struct PublicStructThatGoesPrivate;
13 changes: 13 additions & 0 deletions test_outputs/struct_missing.output.ron
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit f605781

Please sign in to comment.