summaryrefslogtreecommitdiffstats
path: root/tests/ui/generator/issue-53548.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /tests/ui/generator/issue-53548.rs
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/generator/issue-53548.rs')
-rw-r--r--tests/ui/generator/issue-53548.rs38
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/ui/generator/issue-53548.rs b/tests/ui/generator/issue-53548.rs
deleted file mode 100644
index 3ebabb914..000000000
--- a/tests/ui/generator/issue-53548.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-// Regression test for #53548. The `Box<dyn Trait>` type below is
-// expanded to `Box<dyn Trait + 'static>`, but the generator "witness"
-// that results is `for<'r> { Box<dyn Trait + 'r> }`. The WF code was
-// encountering an ICE (when debug-assertions were enabled) and an
-// unexpected compilation error (without debug-asserions) when trying
-// to process this `'r` region bound. In particular, to be WF, the
-// region bound must meet the requirements of the trait, and hence we
-// got `for<'r> { 'r: 'static }`. This would ICE because the `Binder`
-// constructor we were using was assering that no higher-ranked
-// regions were involved (because the WF code is supposed to skip
-// those). The error (if debug-asserions were disabled) came because
-// we obviously cannot prove that `'r: 'static` for any region `'r`.
-// Pursuant with our "lazy WF" strategy for higher-ranked regions, the
-// fix is not to require that `for<'r> { 'r: 'static }` holds (this is
-// also analogous to what we would do for higher-ranked regions
-// appearing within the trait in other positions).
-//
-// check-pass
-
-#![feature(generators)]
-
-use std::cell::RefCell;
-use std::rc::Rc;
-
-trait Trait: 'static {}
-
-struct Store<C> {
- inner: Rc<RefCell<Option<C>>>,
-}
-
-fn main() {
- Box::new(static move || {
- let store = Store::<Box<dyn Trait>> {
- inner: Default::default(),
- };
- yield ();
- });
-}