rust/tests/ui/const-generics/issues/issue-63322-forbid-dyn.rs

18 lines
397 B
Rust
Raw Normal View History

// revisions: full min
#![cfg_attr(full, feature(adt_const_params))]
#![cfg_attr(full, allow(incomplete_features))]
2020-04-11 14:02:49 -05:00
trait A {}
struct B;
impl A for B {}
fn test<const T: &'static dyn A>() {
//[full]~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]` to be used
//[min]~^^ ERROR `&'static (dyn A + 'static)` is forbidden
2020-04-11 14:02:49 -05:00
unimplemented!()
}
fn main() {
test::<{ &B }>();
}