Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. #![feature(const_generics)]
  2.  
  3. struct Tag<const S: &'static str>;
  4.  
  5. mod tags {
  6. use super::Tag;
  7.  
  8. pub type x = Tag<"x">;
  9. pub type y = Tag<"y">;
  10. }
  11.  
  12. fn main() {
  13. let _: tags::x = Tag::<"z">;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement