diff options
Diffstat (limited to 'tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs')
-rw-r--r-- | tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs new file mode 100644 index 000000000..bc8864000 --- /dev/null +++ b/tests/ui/rfcs/rfc-2396-target_feature-11/issue-108655-inline-always-closure.rs @@ -0,0 +1,18 @@ +// Tests #108655: closures in `#[target_feature]` functions can still be marked #[inline(always)] + +// check-pass +// revisions: mir thir +// [thir]compile-flags: -Z thir-unsafeck +// only-x86_64 + +#![feature(target_feature_11)] + +#[target_feature(enable = "avx")] +pub unsafe fn test() { + ({ + #[inline(always)] + move || {} + })(); +} + +fn main() {} |