diff --git a/src/test/compile-fail/attr-usage-inline.rs b/src/test/compile-fail/attr-usage-inline.rs index 40edbe86c7b3..c6b9b016331a 100644 --- a/src/test/compile-fail/attr-usage-inline.rs +++ b/src/test/compile-fail/attr-usage-inline.rs @@ -14,6 +14,6 @@ fn f() {} #[inline] //~ ERROR: attribute should be applied to function -struct S; //~ not a function +struct S; fn main() {} diff --git a/src/test/compile-fail/attr-usage-repr.rs b/src/test/compile-fail/attr-usage-repr.rs index 5e0259cb2291..c0bfd3690c85 100644 --- a/src/test/compile-fail/attr-usage-repr.rs +++ b/src/test/compile-fail/attr-usage-repr.rs @@ -13,7 +13,7 @@ #![feature(repr_simd)] #[repr(C)] //~ ERROR: attribute should be applied to struct, enum or union -fn f() {} //~ not a struct, enum or union +fn f() {} #[repr(C)] struct SExtern(f64, f64); @@ -25,19 +25,19 @@ struct SPacked(f64, f64); struct SSimd(f64, f64); #[repr(i8)] //~ ERROR: attribute should be applied to enum -struct SInt(f64, f64); //~ not an enum +struct SInt(f64, f64); #[repr(C)] enum EExtern { A, B } #[repr(align(8))] //~ ERROR: attribute should be applied to struct -enum EAlign { A, B } // not a struct +enum EAlign { A, B } #[repr(packed)] //~ ERROR: attribute should be applied to struct -enum EPacked { A, B } // not a struct +enum EPacked { A, B } #[repr(simd)] //~ ERROR: attribute should be applied to struct -enum ESimd { A, B } // not a struct +enum ESimd { A, B } #[repr(i8)] enum EInt { A, B } diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-inline.rs b/src/test/compile-fail/feature-gate/issue-43106-gating-of-inline.rs index d86eb50c4aee..24e77bf60a8d 100644 --- a/src/test/compile-fail/feature-gate/issue-43106-gating-of-inline.rs +++ b/src/test/compile-fail/feature-gate/issue-43106-gating-of-inline.rs @@ -21,28 +21,17 @@ #[inline = "2100"] //~^ ERROR attribute should be applied to function mod inline { -//~^ not a function - mod inner { - //~^ not a function - #![inline="2100"] - //~^ ERROR attribute should be applied to function - } - - #[inline = "2100"] - fn f() { } - - #[inline = "2100"] + mod inner { #![inline="2100"] } //~^ ERROR attribute should be applied to function - struct S; - //~^ not a function - #[inline = "2100"] - //~^ ERROR attribute should be applied to function - type T = S; - //~^ not a function + #[inline = "2100"] fn f() { } - #[inline = "2100"] + #[inline = "2100"] struct S; + //~^ ERROR attribute should be applied to function + + #[inline = "2100"] type T = S; + //~^ ERROR attribute should be applied to function + + #[inline = "2100"] impl S { } //~^ ERROR attribute should be applied to function - impl S { } - //~^ not a function }