1 #![feature(const_generics)]
2 #![allow(incomplete_features)]
4 pub struct Struct<const N: usize>(());
6 impl<const N: usize> Struct<N> {
11 pub fn same_ty<const M: usize>(&self) -> (usize, usize) {
15 pub fn different_ty<const M: u8>(&self) -> (usize, u8) {
19 pub fn containing_ty<T, const M: u8>(&self) -> (usize, u8) {
20 (std::mem::size_of::<T>() + N, M)
23 pub fn we_have_to_go_deeper<const M: usize>(&self) -> Struct<M> {
29 fn foo<const M: usize>(&self) -> usize;
32 impl Foo for Struct<7> {
33 fn foo<const M: usize>(&self) -> usize {