rust/tests/ui/rfcs/rfc-2396-target_feature-11/closures-inherit-target_feature.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
331 B
Rust
Raw Normal View History

// Tests #73631: closures inherit `#[target_feature]` annotations
// check-pass
// only-x86_64
#![feature(target_feature_11)]
#[target_feature(enable = "avx")]
fn also_use_avx() {
println!("Hello from AVX")
}
#[target_feature(enable = "avx")]
fn use_avx() -> Box<dyn Fn()> {
Box::new(|| also_use_avx())
}
2020-10-22 07:37:42 -05:00
fn main() {}