diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2024-01-23 21:19:52 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-23 21:19:52 +0100 |
| commit | e8f9e5481e3418d0525c4d54e61630391075c31d (patch) | |
| tree | be2a60dd502872aafa7005d022448a2c138955cf /tests | |
| parent | dfe53afaebd817f334d8ef9dc75a5cd2562cf6e6 (diff) | |
| parent | 98f59817c2cecbaafe47e0458e8281db51452ecd (diff) | |
| download | rust-e8f9e5481e3418d0525c4d54e61630391075c31d.tar.gz rust-e8f9e5481e3418d0525c4d54e61630391075c31d.zip | |
Rollup merge of #119028 - oberien:patch-1, r=cjgillot
Add more weirdness to weird-exprs.rs
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/weird-exprs.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/ui/weird-exprs.rs b/tests/ui/weird-exprs.rs index 6d40d6377c5..748fe13c1e4 100644 --- a/tests/ui/weird-exprs.rs +++ b/tests/ui/weird-exprs.rs @@ -231,6 +231,31 @@ fn infcx() { let _cx: cx::cx::Cx = cx::cx::cx::cx::cx::Cx; } +fn return_already() -> impl std::fmt::Debug { + loop { + return !!!!!!! + break !!!!!!1111 + } +} + +fn fake_macros() -> impl std::fmt::Debug { + loop { + if! { + match! ( + break! { + return! { + 1337 + } + } + ) + + {} + } + + {} + } +} + pub fn main() { strange(); funny(); @@ -257,4 +282,6 @@ pub fn main() { semisemisemisemisemi(); useful_syntax(); infcx(); + return_already(); + fake_macros(); } |
