diff --git a/src/test/compile-fail/feature-gate-unwind-attributes.rs b/src/test/compile-fail/feature-gate-unwind-attributes.rs new file mode 100644 index 00000000000..c8f9cd943cd --- /dev/null +++ b/src/test/compile-fail/feature-gate-unwind-attributes.rs @@ -0,0 +1,28 @@ +// Copyright 2015 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 no-prepopulate-passes + +#![crate_type = "lib"] + +extern { +// CHECK: Function Attrs: nounwind +// CHECK-NEXT: declare void @extern_fn + fn extern_fn(); +// CHECK-NOT: Function Attrs: nounwind +// CHECK: declare void @unwinding_extern_fn + #[unwind] //~ ERROR #[unwind] is experimental + fn unwinding_extern_fn(); +} + +pub unsafe fn force_declare() { + extern_fn(); + unwinding_extern_fn(); +} diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs index 93593b97555..e065fe00bcf 100644 --- a/src/tools/tidy/src/features.rs +++ b/src/tools/tidy/src/features.rs @@ -167,7 +167,7 @@ pub fn check(path: &Path, bad: &mut bool) { // FIXME get this whitelist empty. let whitelist = vec![ - "cfg_target_thread_local", "unwind_attributes", + "cfg_target_thread_local", ]; // Only check the number of lang features.