2020-08-26 18:44:00 +08:00
|
|
|
// revisions: full min
|
|
|
|
#![cfg_attr(full, feature(const_generics))]
|
|
|
|
#![cfg_attr(full, allow(incomplete_features))]
|
|
|
|
#![cfg_attr(min, feature(min_const_generics))]
|
2020-04-11 21:02:49 +02:00
|
|
|
|
|
|
|
trait A {}
|
|
|
|
struct B;
|
|
|
|
impl A for B {}
|
|
|
|
|
|
|
|
fn test<const T: &'static dyn A>() {
|
2020-08-26 18:44:00 +08:00
|
|
|
//[full]~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]` to be used
|
2020-08-26 19:17:07 +08:00
|
|
|
//[min]~^^ ERROR `&'static (dyn A + 'static)` is forbidden as the type of
|
|
|
|
// a const generic parameter
|
2020-08-26 18:44:00 +08:00
|
|
|
//[min]~| ERROR must be annotated with `#[derive(PartialEq, Eq)]` to be used
|
2020-04-11 21:02:49 +02:00
|
|
|
unimplemented!()
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
test::<{ &B }>();
|
|
|
|
}
|