rust/tests/ui/error-emitter/highlighting.rs
klensy 21e97a67ab tests: remove few ignore-stage2
beta was branched long ago, so can be removed
2024-04-25 10:48:11 +03:00

24 lines
604 B
Rust
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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