]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const-generics/issues/issue-63322-forbid-dyn.rs
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / test / ui / const-generics / issues / issue-63322-forbid-dyn.rs
CommitLineData
1b1a35ee 1// revisions: full min
94222f64 2#![cfg_attr(full, feature(adt_const_params))]
1b1a35ee 3#![cfg_attr(full, allow(incomplete_features))]
f9f354fc
XL
4
5trait A {}
6struct B;
7impl A for B {}
8
9fn test<const T: &'static dyn A>() {
10 //~^ ERROR must be annotated with `#[derive(PartialEq, Eq)]` to be used
1b1a35ee 11 //[min]~^^ ERROR `&'static (dyn A + 'static)` is forbidden
f9f354fc
XL
12 unimplemented!()
13}
14
15fn main() {
16 test::<{ &B }>();
17}