rust/tests/ui/traits/next-solver/opaques/overflow-hr-fn-trait-sized-2.rs
2025-09-29 15:28:33 +02:00

15 lines
325 B
Rust

//@ ignore-compare-mode-next-solver
//@ compile-flags: -Znext-solver
//@ check-pass
// Regression test for trait-system-refactor-initiative#204, see
// the sibling test for more details.
fn constrain<'a, F: FnOnce(&'a ())>(_: F) {}
fn foo<'a>(_: &'a ()) -> impl Sized + use<'a> {
constrain(foo);
()
}
fn main() {}