2024-02-16 20:02:50 +00:00
|
|
|
//@ revisions: current next
|
2024-03-11 01:18:41 +00:00
|
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
2024-02-16 20:02:50 +00:00
|
|
|
//@ compile-flags: -Zverbose-internals
|
|
|
|
//@[next] compile-flags: -Znext-solver
|
2024-06-21 05:15:36 +00:00
|
|
|
//@ normalize-stderr-test: "DefId\([^\)]+\)" -> "DefId(..)"
|
2023-10-04 23:08:05 +00:00
|
|
|
|
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
#![rustc_hidden_type_of_opaques]
|
2023-10-04 21:58:38 +00:00
|
|
|
|
|
|
|
// Make sure that the compiler can handle `ReErased` in the hidden type of an opaque.
|
|
|
|
|
|
|
|
fn foo<'a: 'a>(x: &'a Vec<i32>) -> impl Fn() + 'static {
|
2024-03-18 08:33:24 +00:00
|
|
|
//~^ ERROR '{erased}>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()}
|
2024-03-12 15:53:35 +00:00
|
|
|
// Can't write whole type because of lack of path sanitization
|
2023-10-04 21:58:38 +00:00
|
|
|
|| ()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn bar() -> impl Fn() + 'static {
|
2024-03-12 15:53:35 +00:00
|
|
|
//~^ ERROR , ['{erased}])
|
|
|
|
// Can't write whole type because of lack of path sanitization
|
2023-10-04 21:58:38 +00:00
|
|
|
foo(&vec![])
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|