diff --git a/tests/run-pass/generator_niche.rs b/tests/run-pass/generator_niche.rs
new file mode 100644
index 0000000000000000000000000000000000000000..ce68d6e2482a3c53300e28d1c08f0d2437e6394d
--- /dev/null
+++ b/tests/run-pass/generator_niche.rs
@@ -0,0 +1,19 @@
+// https://github.com/rust-lang/rust/issues/47253
+
+#![feature(generators)]
+
+pub struct Foo {
+    _a: bool,
+    _b: Option<String>,
+}
+
+fn main() {
+    let g = ||  {
+        let _f = Foo { _a: true, _b: None };
+        yield ();
+    };
+    match Some(g) {
+        None => (),
+        Some(_) => (),
+    }
+}