rust/tests/ui/traits/non_lifetime_binders/basic.rs
David Wood 8f19fd0841
tests: unconstrain params in non_lifetime_binders
It seems like generics from `non_lifetime_binders` don't have any default
bounds like normal generics, so all of the `?Sized` relaxations need
to be further relaxed with `PointeeSized` for this test to be the
equivalent of before.
2025-06-16 23:04:35 +00:00

22 lines
383 B
Rust

//@ check-pass
// Basic test that show's we can successfully typeck a `for<T>` where clause.
#![feature(sized_hierarchy)]
#![feature(non_lifetime_binders)]
//~^ WARN the feature `non_lifetime_binders` is incomplete
use std::marker::PointeeSized;
trait Trait: PointeeSized {}
impl<T: PointeeSized> Trait for T {}
fn foo()
where
for<T> T: Trait,
{
}
fn main() {
foo();
}