Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. #![feature(const_generics)]
  2.  
  3. struct Struct<T>(T);
  4.  
  5. impl<T, const N: usize> Struct<[T; N]> {
  6. fn f() {}
  7. fn g() { <Struct<[T; N]>>::f(); }
  8. }
  9.  
  10. fn main() {
  11. let _ = Struct::<[i32; 0]>::g();
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement