about summary refs log tree commit diff
path: root/tests/ui/coroutine/metadata-sufficient-for-layout.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/coroutine/metadata-sufficient-for-layout.rs')
-rw-r--r--tests/ui/coroutine/metadata-sufficient-for-layout.rs19
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/ui/coroutine/metadata-sufficient-for-layout.rs b/tests/ui/coroutine/metadata-sufficient-for-layout.rs
index 23937e12c52..9c3a7e4378e 100644
--- a/tests/ui/coroutine/metadata-sufficient-for-layout.rs
+++ b/tests/ui/coroutine/metadata-sufficient-for-layout.rs
@@ -4,22 +4,23 @@
 // Regression test for #80998.
 //
 //@ aux-build:metadata-sufficient-for-layout.rs
+//@ check-pass
 
 #![feature(type_alias_impl_trait, rustc_attrs)]
 #![feature(coroutine_trait)]
 
 extern crate metadata_sufficient_for_layout;
 
-use std::ops::Coroutine;
+mod helper {
+    use std::ops::Coroutine;
+    pub type F = impl Coroutine<(), Yield = (), Return = ()>;
 
-type F = impl Coroutine<(), Yield = (), Return = ()>;
+    fn f() -> F {
+        metadata_sufficient_for_layout::g()
+    }
+}
 
 // Static queries the layout of the coroutine.
-static A: Option<F> = None;
-
-fn f() -> F {
-    metadata_sufficient_for_layout::g()
-}
+static A: Option<helper::F> = None;
 
-#[rustc_error]
-fn main() {} //~ ERROR
+fn main() {}