2023-05-24 10:44:52 -05:00
|
|
|
// Regression test for issue 111184, where ty::GeneratorWitness were not expected to occur in
|
|
|
|
// encode_ty and caused the compiler to ICE.
|
|
|
|
//
|
|
|
|
// needs-sanitizer-cfi
|
2023-07-11 18:19:42 -05:00
|
|
|
// compile-flags: -Ccodegen-units=1 -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi --edition=2021
|
2023-05-24 10:44:52 -05:00
|
|
|
// no-prefer-dynamic
|
|
|
|
// only-x86_64-unknown-linux-gnu
|
2023-07-11 18:19:42 -05:00
|
|
|
// 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());
|
|
|
|
}
|