diff options
| author | bors <bors@rust-lang.org> | 2017-06-06 14:46:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-06-06 14:46:26 +0000 |
| commit | a032cb89c5d9b436c1c57f8a6d5961d898f5c2b6 (patch) | |
| tree | 3a102e9b59e51f2e4eb7856d16f89ee5d02d7f8e /src | |
| parent | e1293ecbeaa6996d79282a79bd6f3340b487dab8 (diff) | |
| parent | 9d67dfec129ccdad10437e304caa5d910dc71593 (diff) | |
| download | rust-a032cb89c5d9b436c1c57f8a6d5961d898f5c2b6.tar.gz rust-a032cb89c5d9b436c1c57f8a6d5961d898f5c2b6.zip | |
Auto merge of #42247 - durka:patch-41, r=arielb1
add playbot jokes to run-pass test Some funny expressions that people pull out on IRC, that might actually be useful to test pathological parser behavior.
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/run-pass/weird-exprs.rs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/test/run-pass/weird-exprs.rs b/src/test/run-pass/weird-exprs.rs index b28760e6c91..20f58301d45 100644 --- a/src/test/run-pass/weird-exprs.rs +++ b/src/test/run-pass/weird-exprs.rs @@ -77,6 +77,36 @@ fn angrydome() { fn evil_lincoln() { let _evil = println!("lincoln"); } +fn dots() { + assert_eq!(String::from(".................................................."), + format!("{:?}", .. .. .. .. .. .. .. .. .. .. .. .. .. + .. .. .. .. .. .. .. .. .. .. .. ..)); +} + +fn you_eight() { + assert_eq!(8, { + macro_rules! u8 { + (u8) => { + mod u8 { + pub fn u8<'u8>(u8: &'u8 u8) -> &'u8 u8 { + "u8"; + u8 + } + } + }; + } + + u8!(u8); + let &u8: &u8 = u8::u8(&8u8); + u8 + }); +} + +fn fishy() { + assert_eq!(String::from("><>"), + String::<>::from::<>("><>").chars::<>().rev::<>().collect::<String>()); +} + pub fn main() { strange(); funny(); @@ -86,4 +116,7 @@ pub fn main() { canttouchthis(); angrydome(); evil_lincoln(); + dots(); + you_eight(); + fishy(); } |
