diff options
| author | Amanieu d'Antras <amanieu@gmail.com> | 2018-04-27 07:20:46 +0200 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2018-04-27 12:34:01 +0200 |
| commit | 5f2c111165371b1e59fec9cd90e364ccf08b68ef (patch) | |
| tree | cb2778e11461f77953bac15924e43630af62682b /src/test/compile-fail | |
| parent | 9822b5709ca78d6398e9ae609de0181116e8b0db (diff) | |
| download | rust-5f2c111165371b1e59fec9cd90e364ccf08b68ef.tar.gz rust-5f2c111165371b1e59fec9cd90e364ccf08b68ef.zip | |
Allow #[inline] on closures
Fixes #49632
Diffstat (limited to 'src/test/compile-fail')
| -rw-r--r-- | src/test/compile-fail/attr-usage-inline.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-31769.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-43988.rs | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/test/compile-fail/attr-usage-inline.rs b/src/test/compile-fail/attr-usage-inline.rs index c6b9b016331..250905dbdcd 100644 --- a/src/test/compile-fail/attr-usage-inline.rs +++ b/src/test/compile-fail/attr-usage-inline.rs @@ -13,7 +13,7 @@ #[inline] fn f() {} -#[inline] //~ ERROR: attribute should be applied to function +#[inline] //~ ERROR: attribute should be applied to function or closure struct S; fn main() {} diff --git a/src/test/compile-fail/issue-31769.rs b/src/test/compile-fail/issue-31769.rs index 7f73d9076ec..2bd45deeab4 100644 --- a/src/test/compile-fail/issue-31769.rs +++ b/src/test/compile-fail/issue-31769.rs @@ -9,6 +9,6 @@ // except according to those terms. fn main() { - #[inline] struct Foo; //~ ERROR attribute should be applied to function + #[inline] struct Foo; //~ ERROR attribute should be applied to function or closure #[repr(C)] fn foo() {} //~ ERROR attribute should be applied to struct, enum or union } diff --git a/src/test/compile-fail/issue-43988.rs b/src/test/compile-fail/issue-43988.rs index ff1fdaef416..0dfa9f6f0d3 100644 --- a/src/test/compile-fail/issue-43988.rs +++ b/src/test/compile-fail/issue-43988.rs @@ -14,12 +14,12 @@ fn main() { #[inline] let _a = 4; - //~^^ ERROR attribute should be applied to function + //~^^ ERROR attribute should be applied to function or closure #[inline(XYZ)] let _b = 4; - //~^^ ERROR attribute should be applied to function + //~^^ ERROR attribute should be applied to function or closure #[repr(nothing)] let _x = 0; @@ -40,7 +40,7 @@ fn main() { #[inline(ABC)] foo(); - //~^^ ERROR attribute should be applied to function + //~^^ ERROR attribute should be applied to function or closure let _z = #[repr] 1; //~^ ERROR attribute should not be applied to an expression |
