diff --git a/test_crates/infinite_importable_paths/new/Cargo.toml b/test_crates/infinite_importable_paths/new/Cargo.toml new file mode 100644 index 00000000..7136ed72 --- /dev/null +++ b/test_crates/infinite_importable_paths/new/Cargo.toml @@ -0,0 +1,7 @@ +[package] +publish = false +name = "infinite_importable_paths" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/test_crates/infinite_importable_paths/new/src/lib.rs b/test_crates/infinite_importable_paths/new/src/lib.rs new file mode 100644 index 00000000..efb5e67b --- /dev/null +++ b/test_crates/infinite_importable_paths/new/src/lib.rs @@ -0,0 +1,23 @@ +//! This package exports the functions: +//! - `foo` +//! - `nested::foo` +//! - `nested::nested::foo` +//! etc. with arbitrarily many repetitions of `nested` allowed. +//! +//! This package uses a different way of achieving the same thing +//! compared to its variant in the `old` directory. +//! No semver issues should be reported when comparing the two. + +mod nested_other { + pub use super::nested; + + pub fn foo() {} +} + +pub mod nested { + pub use crate::nested_other::foo; + + pub use crate::nested_other::nested; +} + +pub use nested::foo; diff --git a/test_crates/infinite_importable_paths/old/Cargo.toml b/test_crates/infinite_importable_paths/old/Cargo.toml new file mode 100644 index 00000000..7136ed72 --- /dev/null +++ b/test_crates/infinite_importable_paths/old/Cargo.toml @@ -0,0 +1,7 @@ +[package] +publish = false +name = "infinite_importable_paths" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/test_crates/infinite_importable_paths/old/src/lib.rs b/test_crates/infinite_importable_paths/old/src/lib.rs new file mode 100644 index 00000000..2db43f28 --- /dev/null +++ b/test_crates/infinite_importable_paths/old/src/lib.rs @@ -0,0 +1,13 @@ +//! This package exports the functions: +//! - `foo` +//! - `nested::foo` +//! - `nested::nested::foo` +//! etc. with arbitrarily many repetitions of `nested` allowed. + +pub mod nested { + pub use super::nested; + + pub fn foo() {} +} + +pub use nested::foo;