mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 22:12:15 +00:00
Rollup merge of #121284 - notriddle:notriddle/issue-106421, r=Mark-Simulacrum
Add test cases for inlining compiler-private items Closes #106421 This was already fixed by #121218, but now the test cases are added.
This commit is contained in:
commit
f780824c14
9
tests/rustdoc/auxiliary/issue-106421-force-unstable.rs
Normal file
9
tests/rustdoc/auxiliary/issue-106421-force-unstable.rs
Normal file
@ -0,0 +1,9 @@
|
||||
//@ compile-flags: -Zforce-unstable-if-unmarked
|
||||
#![crate_name="foo"]
|
||||
pub struct FatalError;
|
||||
|
||||
impl FatalError {
|
||||
pub fn raise(self) -> ! {
|
||||
loop {}
|
||||
}
|
||||
}
|
8
tests/rustdoc/issue-106421-not-internal.rs
Normal file
8
tests/rustdoc/issue-106421-not-internal.rs
Normal file
@ -0,0 +1,8 @@
|
||||
//@ aux-build:issue-106421-force-unstable.rs
|
||||
//@ ignore-cross-compile
|
||||
// This is the version where a non-compiler-internal crate inlines a compiler-internal one.
|
||||
// In this case, the item shouldn't be documented, because regular users can't get at it.
|
||||
extern crate foo;
|
||||
|
||||
// @!has issue_106421_not_internal/struct.FatalError.html '//*[@id="method.raise"]' 'fn raise'
|
||||
pub use foo::FatalError;
|
8
tests/rustdoc/issue-106421.rs
Normal file
8
tests/rustdoc/issue-106421.rs
Normal file
@ -0,0 +1,8 @@
|
||||
//@ aux-build:issue-106421-force-unstable.rs
|
||||
//@ ignore-cross-compile
|
||||
//@ compile-flags: -Zforce-unstable-if-unmarked
|
||||
|
||||
extern crate foo;
|
||||
|
||||
// @has issue_106421/struct.FatalError.html '//*[@id="method.raise"]' 'fn raise'
|
||||
pub use foo::FatalError;
|
Loading…
Reference in New Issue
Block a user