1 // Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // This is testing whether `#[inline]` signals an error or warning
12 // when put in "weird" places.
14 // (This file sits on its own because it actually signals an error,
15 // which would mess up the treatment of other cases in
16 // issue-43106-gating-of-builtin-attrs.rs)
18 // Crate-level is accepted, though it is almost certainly unused?
22 //~^ ERROR attribute should be applied to function
24 mod inner { #![inline="2100"] }
25 //~^ ERROR attribute should be applied to function
27 #[inline = "2100"] fn f() { }
29 #[inline = "2100"] struct S;
30 //~^ ERROR attribute should be applied to function
32 #[inline = "2100"] type T = S;
33 //~^ ERROR attribute should be applied to function
35 #[inline = "2100"] impl S { }
36 //~^ ERROR attribute should be applied to function