Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a test case with infinite importable paths. #287

Merged
merged 4 commits into from
Jan 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions test_crates/infinite_importable_paths/new/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
publish = false
name = "infinite_importable_paths"
version = "0.1.0"
edition = "2021"

[dependencies]
23 changes: 23 additions & 0 deletions test_crates/infinite_importable_paths/new/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
7 changes: 7 additions & 0 deletions test_crates/infinite_importable_paths/old/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
publish = false
name = "infinite_importable_paths"
version = "0.1.0"
edition = "2021"

[dependencies]
13 changes: 13 additions & 0 deletions test_crates/infinite_importable_paths/old/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;