rust/tests/ui/error-emitter/unicode-output.rs

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

22 lines
563 B
Rust
Raw Normal View History

//@ compile-flags: -Zunstable-options=yes --error-format=human-unicode --color=always
//@ edition:2018
//@ only-linux
use core::pin::Pin;
use core::future::Future;
use core::any::Any;
fn query(_: fn(Box<(dyn Any + Send + '_)>) -> Pin<Box<(
dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static
)>>) {}
fn wrapped_fn<'a>(_: Box<(dyn Any + Send)>) -> Pin<Box<(
dyn Future<Output = Result<Box<(dyn Any + 'static)>, String>> + Send + 'static
)>> {
Box::pin(async { Err("nope".into()) })
}
fn main() {
query(wrapped_fn);
}