SHARE
TWEET

Untitled

a guest Aug 18th, 2019 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #![feature(type_alias_impl_trait)]
  2.  
  3. mod inner {
  4.     pub type TheAnswer = impl std::fmt::Display;
  5.  
  6.     pub fn get_displayable() -> TheAnswer {
  7.         42
  8.     }
  9. }
  10.  
  11.  
  12. fn main() {
  13.     let x: inner::TheAnswer = inner::get_displayable();
  14.     println!("{}", x);
  15. }
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