Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![feature(type_alias_impl_trait)]
- mod inner {
- pub type TheAnswer = impl std::fmt::Display;
- pub fn get_displayable() -> TheAnswer {
- 42
- }
- }
- fn main() {
- let x: inner::TheAnswer = inner::get_displayable();
- println!("{}", x);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement