1
Fork 0
rust/tests/ui/traits/unsize-goal-escaping-bounds.rs
2025-02-10 21:53:05 +00:00

22 lines
411 B
Rust

//@ revisions: current next
//@[next] compile-flags: -Znext-solver
//@[next] check-pass
//@ ignore-compare-mode-next-solver (explicit revisions)
#![feature(unsize)]
use std::marker::Unsize;
trait Trait {}
impl Trait for () {}
fn foo()
where
for<'a> (): Unsize<dyn Trait + 'a>,
{
}
fn main() {
foo();
//[current]~^ ERROR the trait bound `for<'a> (): Unsize<(dyn Trait + 'a)>` is not satisfied
}