]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/const-generics/generic_const_exprs/object-safety-ok-infer-err.rs
1 #![feature(generic_const_exprs)]
2 #![allow(incomplete_features)]
4 trait Foo
<const N
: usize> {
5 fn test(&self) -> [u8; N
+ 1];
8 impl<const N
: usize> Foo
<N
> for () {
9 fn test(&self) -> [u8; N
+ 1] {
14 fn use_dyn
<const N
: usize>(v
: &dyn Foo
<N
>) where [u8; N
+ 1]: Sized
{
15 assert_eq
!(v
.test(), [0; N
+ 1]);
20 //~^ ERROR type annotations needed