mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-19 12:05:08 +00:00
27 lines
674 B
Rust
27 lines
674 B
Rust
#![feature(generic_const_exprs)]
|
|
//~^ WARN the feature `generic_const_exprs` is incomplete
|
|
#![feature(non_lifetime_binders)]
|
|
//~^ WARN the feature `non_lifetime_binders` is incomplete
|
|
|
|
// Test for <https://github.com/rust-lang/rust/issues/115497>,
|
|
// which originally relied on associated_type_bounds, but was
|
|
// minimized away from that.
|
|
|
|
trait TraitA {
|
|
type AsA;
|
|
}
|
|
trait TraitB {
|
|
type AsB;
|
|
}
|
|
trait TraitC {}
|
|
|
|
fn foo<T>()
|
|
where
|
|
for<const N: u8 = { T::A }> T: TraitA<AsA = impl TraitB<AsB = impl TraitC>>,
|
|
//~^ ERROR defaults for generic parameters are not allowed in `for<...>` binders
|
|
//~| ERROR `impl Trait` is not allowed in bounds
|
|
{
|
|
}
|
|
|
|
fn main() {}
|