diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-08-17 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-08-17 00:00:00 +0000 |
| commit | 9a0ee05c3d7f355d00c365b9589c7924e40b19ab (patch) | |
| tree | c8b914b690d4bd4c38a120166c3009d7870f475e /src/test/ui | |
| parent | d83da1d05dc75ff3452c068299f40e5d99589d71 (diff) | |
| download | rust-9a0ee05c3d7f355d00c365b9589c7924e40b19ab.tar.gz rust-9a0ee05c3d7f355d00c365b9589c7924e40b19ab.zip | |
Split critical edge targeting the start block
Diffstat (limited to 'src/test/ui')
| -rw-r--r-- | src/test/ui/codegen/issue-88043-bb-does-not-have-terminator.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/codegen/issue-88043-bb-does-not-have-terminator.rs b/src/test/ui/codegen/issue-88043-bb-does-not-have-terminator.rs index 1a6aadc662b..38dfca347c8 100644 --- a/src/test/ui/codegen/issue-88043-bb-does-not-have-terminator.rs +++ b/src/test/ui/codegen/issue-88043-bb-does-not-have-terminator.rs @@ -22,4 +22,14 @@ fn take_until(terminate: impl Fn() -> bool) { // CHECK-LABEL: @main fn main() { take_until(|| true); + f(None); } + +fn f(_a: Option<String>) -> Option<u32> { + loop { + g(); + () + } +} + +fn g() -> Option<u32> { None } |
