2023-10-19 11:06:43 -05:00
|
|
|
// Regression test for issue 111184, where ty::CoroutineWitness were not expected to occur in
|
2023-05-24 10:44:52 -05:00
|
|
|
// encode_ty and caused the compiler to ICE.
|
|
|
|
//
|
2024-02-16 14:02:50 -06:00
|
|
|
//@ needs-sanitizer-cfi
|
|
|
|
//@ compile-flags: -Ccodegen-units=1 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi --edition=2021
|
|
|
|
//@ no-prefer-dynamic
|
|
|
|
//@ only-x86_64-unknown-linux-gnu
|
|
|
|
//@ build-pass
|
2023-05-24 10:44:52 -05:00
|
|
|
|
|
|
|
use std::future::Future;
|
|
|
|
|
|
|
|
async fn foo() {}
|
|
|
|
fn bar<T>(_: impl Future<Output = T>) {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
bar(foo());
|
|
|
|
}
|