2014-10-24 10:32:43 -04:00
|
|
|
// Copyright 2012 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 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2018-09-14 12:20:28 +02:00
|
|
|
#![allow(dead_code)]
|
2014-10-24 10:32:43 -04:00
|
|
|
// Static recursion check shouldn't fail when given a foreign item (#18279)
|
|
|
|
|
|
|
|
// aux-build:check_static_recursion_foreign_helper.rs
|
2017-10-22 20:01:00 -07:00
|
|
|
// ignore-wasm32-bare no libc to test ffi with
|
2015-02-14 16:15:43 +05:30
|
|
|
|
2015-03-22 13:13:15 -07:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2015-03-05 18:33:58 -08:00
|
|
|
#![feature(custom_attribute, libc)]
|
2015-02-14 16:15:43 +05:30
|
|
|
|
2014-10-24 10:32:43 -04:00
|
|
|
extern crate check_static_recursion_foreign_helper;
|
|
|
|
extern crate libc;
|
|
|
|
|
|
|
|
use libc::c_int;
|
|
|
|
|
|
|
|
#[link_name = "check_static_recursion_foreign_helper"]
|
|
|
|
extern "C" {
|
|
|
|
#[allow(dead_code)]
|
|
|
|
static test_static: c_int;
|
|
|
|
}
|
|
|
|
|
2016-08-26 19:23:42 +03:00
|
|
|
static B: &'static c_int = unsafe { &test_static };
|
2014-10-24 10:32:43 -04:00
|
|
|
|
|
|
|
pub fn main() {}
|