SHARE
TWEET

Untitled

a guest Sep 19th, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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::<"x">;
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top