rust/tests/ui/async-await/async-closures/fn-exception-target-features.rs

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

18 lines
411 B
Rust
Raw Normal View History

//@ edition: 2021
//@ only-x86_64
#![feature(async_closure, target_feature_11)]
// `target_feature_11` just to test safe functions w/ target features.
use std::pin::Pin;
use std::future::Future;
#[target_feature(enable = "sse2")]
fn target_feature() -> Pin<Box<dyn Future<Output = ()> + 'static>> { todo!() }
2024-11-04 18:59:57 +00:00
fn test(f: impl AsyncFn()) {}
fn main() {
test(target_feature); //~ ERROR the trait bound
}