Created
November 25, 2018 18:14
-
-
Save lukewilson2002/295df5139fd22798d6881b1d8286a500 to your computer and use it in GitHub Desktop.
Created by repnop and Violetas The Crusader in the Rust Programming Language Discord server for satirical purposes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[allow(bad_style)] | |
struct cout; | |
impl<T: std::fmt::Display> std::ops::Shl<T> for cout { | |
type Output = cout; | |
fn shl(self, rhs: T) -> cout { | |
print!("{}", rhs); | |
cout | |
} | |
} | |
#[allow(bad_style)] | |
struct endl; | |
impl std::fmt::Display for endl { | |
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { | |
writeln!(f, "") | |
} | |
} | |
fn main() { | |
cout << "Hello, world!" << endl << "Foo bar"; | |
//Hello, world! | |
//Foo bar | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment