diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/generator/drop-track-addassign-yield.rs | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/generator/drop-track-addassign-yield.rs')
-rw-r--r-- | src/test/ui/generator/drop-track-addassign-yield.rs | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/test/ui/generator/drop-track-addassign-yield.rs b/src/test/ui/generator/drop-track-addassign-yield.rs deleted file mode 100644 index 71cfb170b..000000000 --- a/src/test/ui/generator/drop-track-addassign-yield.rs +++ /dev/null @@ -1,41 +0,0 @@ -// run-pass -// compile-flags: -Zdrop-tracking - -// Based on addassign-yield.rs, but with drop tracking enabled. Originally we did not implement -// the fake_read callback on ExprUseVisitor which caused this case to break. - -#![feature(generators)] - -fn foo() { - let _y = static || { - let x = &mut 0; - *{ - yield; - x - } += match String::new() { - _ => 0, - }; - }; - - // Please don't ever actually write something like this - let _z = static || { - let x = &mut 0; - *{ - let inner = &mut 1; - *{ - yield (); - inner - } += match String::new() { - _ => 1, - }; - yield; - x - } += match String::new() { - _ => 2, - }; - }; -} - -fn main() { - foo() -} |