]> git.lizzy.rs Git - rust.git/commitdiff
fake the feature-gate-linker-flavor compile fail test
authorJorge Aparicio <japaricious@gmail.com>
Sat, 8 Apr 2017 02:47:58 +0000 (21:47 -0500)
committerJorge Aparicio <japaricious@gmail.com>
Sat, 8 Apr 2017 02:47:58 +0000 (21:47 -0500)
as there's no way to generate a `#![feature(linker_flavor)]` error

src/test/compile-fail/feature-gate-linker-flavor.rs

index 099d488376e7cbd4236740b17b142ba884b5b263..68679d7dac896a22a04f855fdc6ca7aea911cf22 100644 (file)
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-#![linker_flavor] //~ ERROR the `#[linker_flavor]` attribute is
+#[used]
+fn foo() {}
+//~^^ ERROR the `#[used]` attribute is an experimental feature
 
 fn main() {}