add regression test for #97589

This commit is contained in:
dianne 2024-09-11 13:29:25 -07:00
parent 9a7644e171
commit a187d0a90c
3 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,6 @@
//@ error-pattern: circular modules
// Regression test for #97589: a doc-comment on a circular module bypassed cycle detection
#![crate_type = "lib"]
pub mod recursive;

View File

@ -0,0 +1,8 @@
error: circular modules: $DIR/recursive.rs -> $DIR/recursive.rs
--> $DIR/recursive.rs:6:1
|
LL | mod recursive;
| ^^^^^^^^^^^^^^
error: aborting due to 1 previous error

View File

@ -0,0 +1,6 @@
//@ ignore-test: this is an auxiliary file for circular-module-with-doc-comment-issue-97589.rs
//! this comment caused the circular dependency checker to break
#[path = "recursive.rs"]
mod recursive;