-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement notion of 'public_api' for importable paths
- Loading branch information
1 parent
9ac3cd1
commit 45fba69
Showing
11 changed files
with
277 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[package] | ||
name = "importable_paths" | ||
version = "0.1.0" | ||
edition = "2021" | ||
publish = false | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
pub struct PublicImportable {} | ||
|
||
mod private { | ||
pub struct Private {} | ||
} | ||
|
||
#[doc(hidden)] | ||
pub mod hidden { | ||
pub struct ModuleHidden {} | ||
|
||
#[deprecated] | ||
pub struct DeprecatedModuleHidden {} // public_api | ||
|
||
#[deprecated] | ||
pub mod deprecated { | ||
pub struct ModuleDeprecatedModuleHidden {} // public_api | ||
} | ||
} | ||
|
||
pub mod submodule { | ||
#[doc(hidden)] | ||
pub struct Hidden {} | ||
|
||
#[deprecated] | ||
#[doc(hidden)] | ||
pub struct DeprecatedHidden {} // public_api | ||
} | ||
|
||
#[deprecated] | ||
pub mod deprecated { | ||
pub struct ModuleDeprecated {} // public_api | ||
|
||
#[doc(hidden)] | ||
pub struct ModuleDeprecatedHidden {} // public_api | ||
} | ||
|
||
// This is expected to be visible in rustdoc. | ||
pub use hidden::ModuleHidden as UsedVisible; // public_api | ||
|
||
// This is expected to be hidden in rustdoc. | ||
pub use submodule::Hidden as UsedHidden; | ||
|
||
// This is expected to be public_api and deprecated | ||
pub use deprecated::ModuleDeprecated as UsedModuleDeprecated; | ||
|
||
// not public_api; it's not relevant that the module was deprecated | ||
pub use deprecated::ModuleDeprecatedHidden as UsedModuleDeprecatedHidden; |