From 76ceeddb2b6fd4589cf8292d8dafa65a91ace019 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Thu, 6 Sep 2018 14:36:26 +0200 Subject: Migrated remaining `src/test/run-pass/` subdirectories to `src/test/ui/run-pass/`. --- src/test/run-pass/thinlto/weak-works.rs | 36 --------------------------------- 1 file changed, 36 deletions(-) delete mode 100644 src/test/run-pass/thinlto/weak-works.rs (limited to 'src/test/run-pass/thinlto/weak-works.rs') diff --git a/src/test/run-pass/thinlto/weak-works.rs b/src/test/run-pass/thinlto/weak-works.rs deleted file mode 100644 index 0a1b7307a46..00000000000 --- a/src/test/run-pass/thinlto/weak-works.rs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2017 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: -C codegen-units=8 -Z thinlto -// ignore-windows - -#![feature(linkage)] - -pub mod foo { - #[linkage = "weak"] - #[no_mangle] - pub extern "C" fn FOO() -> i32 { - 0 - } -} - -mod bar { - extern "C" { - fn FOO() -> i32; - } - - pub fn bar() -> i32 { - unsafe { FOO() } - } -} - -fn main() { - bar::bar(); -} -- cgit 1.4.1-3-g733a5