From 3ba7c00f94cd4ba046777a3cdbcb5fad17c1f6cf Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 28 Apr 2018 21:56:38 +0200 Subject: Prevent infinite recursion of modules --- src/test/rustdoc/auxiliary/mod-stackoverflow.rs | 21 +++++++++++++++++++++ src/test/rustdoc/mod-stackoverflow.rs | 16 ++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/test/rustdoc/auxiliary/mod-stackoverflow.rs create mode 100644 src/test/rustdoc/mod-stackoverflow.rs (limited to 'src/test') 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 or the MIT license +// , 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 or the MIT license +// , 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; -- cgit 1.4.1-3-g733a5