]> git.proxmox.com Git - rustc.git/blame - src/test/incremental/thinlto/cgu_invalidated_when_export_removed.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / incremental / thinlto / cgu_invalidated_when_export_removed.rs
CommitLineData
74b04a01
XL
1// revisions: cfail1 cfail2
2// build-pass
3
4// rust-lang/rust#69798:
5//
f2b60f7d 6// This is analogous to cgu_invalidated_when_export_added, but it covers the
74b04a01
XL
7// other direction. This is analogous to cgu_invalidated_when_import_added: we
8// include it, because it may uncover bugs in variant implementation strategies.
9
10pub struct Foo {}
11impl Drop for Foo {
12 fn drop(&mut self) {
13 println!("Dropping Foo");
14 }
15}
16#[no_mangle]
17pub extern "C" fn run() {
18 thread_local! { pub static FOO : Foo = Foo { } ; }
19
20 #[cfg(cfail1)]
21 {
22 FOO.with(|_f| ())
23 }
24}
25
26pub fn main() { run() }