Skip to content

Commit b7ae32b

Browse files
committed
Add 77708
Issue: rust-lang/rust#77708
1 parent 1e4e601 commit b7ae32b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

ices/77708.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
rustc --edition 2018 -C incremental=foo --crate-type lib - <<'EOF'
4+
#![feature(const_generics, const_evaluatable_checked)]
5+
#![allow(incomplete_features)]
6+
use core::{convert::TryFrom, num::NonZeroUsize};
7+
8+
struct A<const N: NonZeroUsize>([u8; N.get()]) where [u8; N.get()]: Sized;
9+
10+
impl<'a, const N: NonZeroUsize> TryFrom<&'a [u8]> for A<N> where [u8; N.get()]: Sized {
11+
type Error = ();
12+
fn try_from(slice: &'a [u8]) -> Result<A<N>, ()> {
13+
let _x = <&[u8; N.get()] as TryFrom<&[u8]>>::try_from(slice);
14+
unimplemented!();
15+
}
16+
}
17+
EOF

0 commit comments

Comments
 (0)