summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-05-07 23:18:12 +0000
committerbors <bors@rust-lang.org>2018-05-07 23:18:12 +0000
commit715d6a98aa4908dfb85b55f97e51af330d0baf7f (patch)
tree379f6676cc1bd82083367a7aaa3e75ce14b4381f /src/test
parent565235ee7e2d978e98b84450e15f673c84123a8a (diff)
parent3ba7c00f94cd4ba046777a3cdbcb5fad17c1f6cf (diff)
downloadrust-715d6a98aa4908dfb85b55f97e51af330d0baf7f.tar.gz
rust-715d6a98aa4908dfb85b55f97e51af330d0baf7f.zip
Auto merge of #50305 - GuillaumeGomez:fix-mod-stackoverflow, r=QuietMisdreavus
Prevent infinite recursion of modules

Fixes #50196.

r? @QuietMisdreavus
Diffstat (limited to 'src/test')
-rw-r--r--src/test/rustdoc/auxiliary/mod-stackoverflow.rs21
-rw-r--r--src/test/rustdoc/mod-stackoverflow.rs16
2 files changed, 37 insertions, 0 deletions
diff --git a/src/test/rustdoc/auxiliary/mod-stackoverflow.rs b/src/test/rustdoc/auxiliary/mod-stackoverflow.rs
new file mode 100644
index 00000000000..f03593dbee6
--- /dev/null
+++ b/src/test/rustdoc/auxiliary/mod-stackoverflow.rs
@@ -0,0 +1,21 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags: -Cmetadata=aux
+
+pub mod tree {
+    pub use tree;
+}
+
+pub mod tree2 {
+    pub mod prelude {
+        pub use tree2;
+    }
+}
diff --git a/src/test/rustdoc/mod-stackoverflow.rs b/src/test/rustdoc/mod-stackoverflow.rs
new file mode 100644
index 00000000000..1e2f6dbe780
--- /dev/null
+++ b/src/test/rustdoc/mod-stackoverflow.rs
@@ -0,0 +1,16 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// aux-build:mod-stackoverflow.rs
+// ignore-cross-compile
+
+extern crate mod_stackoverflow;
+pub use mod_stackoverflow::tree;
+pub use mod_stackoverflow::tree2;