Revert "Revert "Don't load all extern crates unconditionally""

This reverts commit 5f0c54db4e.
This commit is contained in:
Joshua Nelson 2021-08-21 20:15:20 +00:00
parent 99b73e81b3
commit d933edd5c6
9 changed files with 99 additions and 40 deletions

View file

@ -0,0 +1,17 @@
// no-prefer-dynamic
#![crate_type = "lib"]
#![no_std]
#![feature(lang_items)]
use core::panic::PanicInfo;
use core::sync::atomic::{self, Ordering};
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
loop {
atomic::compiler_fence(Ordering::SeqCst);
}
}
#[lang = "eh_personality"]
fn foo() {}

View file

@ -0,0 +1,3 @@
// check-pass
// aux-crate:panic_item=panic-item.rs
// @has unused_extern_crate/index.html

View file

@ -1,2 +0,0 @@
/// This will be referred to by the test docstring
pub struct Something;

View file

@ -1,4 +1,4 @@
// aux-crate:priv:issue_66159_1=issue-66159-1.rs
// aux-crate:priv:pub_struct=pub-struct.rs
// compile-flags:-Z unstable-options
// The issue was an ICE which meant that we never actually generated the docs
@ -7,4 +7,4 @@
// verify that the struct is linked correctly.
// @has issue_66159/index.html
//! [issue_66159_1::Something]
//! [pub_struct::SomeStruct]