Files
rust/tests/ui/error-emitter/highlighting.rs
T
Vadim Petrochenkov 56d6b4e427 compiletest: Support matching on non-json lines in compiler output
and migrate most of remaining `error-pattern`s to it.
2025-05-04 18:27:45 +03:00

596 B

// Make sure "highlighted" code is colored purple
 
//@ compile-flags: --error-format=human --color=always
//@ edition:2018
 
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);
}
 
//~? RAW for<'a>