Skip to content

Commit 24aa348

Browse files
committed
Add test cases for inlining compiler-private items
Closes #106421 This was already fixed by f5d43a0, but now the test cases are added.
1 parent 6bdb8a4 commit 24aa348

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//@ compile-flags: -Zforce-unstable-if-unmarked
2+
#![crate_name="foo"]
3+
pub struct FatalError;
4+
5+
impl FatalError {
6+
pub fn raise(self) -> ! {
7+
loop {}
8+
}
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//@ aux-build:issue-106421-force-unstable.rs
2+
//@ ignore-cross-compile
3+
// This is the version where a non-compiler-internal crate inlines a compiler-internal one.
4+
// In this case, the item shouldn't be documented, because regular users can't get at it.
5+
extern crate foo;
6+
7+
// @!has issue_106421_not_internal/struct.FatalError.html '//*[@id="method.raise"]' 'fn raise'
8+
pub use foo::FatalError;

tests/rustdoc/issue-106421.rs

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//@ aux-build:issue-106421-force-unstable.rs
2+
//@ ignore-cross-compile
3+
//@ compile-flags: -Zforce-unstable-if-unmarked
4+
5+
extern crate foo;
6+
7+
// @has issue_106421/struct.FatalError.html '//*[@id="method.raise"]' 'fn raise'
8+
pub use foo::FatalError;

0 commit comments

Comments
 (0)