Skip to content

Commit 0e3ae7a

Browse files
committed
Bless ui-fulldeps.
1 parent 7c38e55 commit 0e3ae7a

1 file changed

Lines changed: 24 additions & 6 deletions

File tree

tests/ui-fulldeps/rustc_public/check_coroutine_body.rs

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use std::io::Write;
1919
use std::ops::ControlFlow;
2020

2121
use rustc_public::mir::Body;
22-
use rustc_public::ty::{RigidTy, TyKind};
22+
use rustc_public::ty::{GenericArgKind, RigidTy, TyKind};
2323

2424
const CRATE_NAME: &str = "crate_coroutine_body";
2525

@@ -50,16 +50,34 @@ fn check_coroutine_body(body: Body) {
5050
panic!("Expected RigidTy::Adt, got: {:#?}", ret_ty);
5151
};
5252

53-
assert_eq!("std::task::Poll", def.0.name());
53+
assert_eq!("std::ops::CoroutineState", def.0.name());
5454

55-
let TyKind::RigidTy(RigidTy::Coroutine(def, ..)) = &local_3.kind() else {
56-
panic!("Expected RigidTy::Coroutine, got: {:#?}", local_3);
55+
let TyKind::RigidTy(RigidTy::Adt(def, args)) = &local_3.kind() else {
56+
panic!("Expected RigidTy::Adt, got: {:#?}", local_3);
57+
};
58+
59+
assert_eq!("std::ops::coroutine::adapters::CoroutineFuture", def.0.name());
60+
61+
let [GenericArgKind::Type(arg0)] = &args.0[..] else {
62+
panic!("Expected a single generic argument, got: {:#?}", args);
63+
};
64+
let TyKind::RigidTy(RigidTy::Coroutine(def, ..)) = &arg0.kind() else {
65+
panic!("Expected RigidTy::Adt, got: {:#?}", local_3);
5766
};
5867

5968
assert_eq!("crate_coroutine_body::gbc::{closure#0}::{closure#0}", def.0.name());
6069

61-
let TyKind::RigidTy(RigidTy::Coroutine(def, ..)) = &local_4.kind() else {
62-
panic!("Expected RigidTy::Coroutine, got: {:#?}", local_4);
70+
let TyKind::RigidTy(RigidTy::Adt(def, args)) = &local_4.kind() else {
71+
panic!("Expected RigidTy::Adt, got: {:#?}", local_4);
72+
};
73+
74+
assert_eq!("std::ops::coroutine::adapters::CoroutineFuture", def.0.name());
75+
76+
let [GenericArgKind::Type(arg0)] = &args.0[..] else {
77+
panic!("Expected a single generic argument, got: {:#?}", args);
78+
};
79+
let TyKind::RigidTy(RigidTy::Coroutine(def, ..)) = &arg0.kind() else {
80+
panic!("Expected RigidTy::Adt, got: {:#?}", local_3);
6381
};
6482

6583
assert_eq!("crate_coroutine_body::gbc::{closure#0}::{closure#0}", def.0.name());

0 commit comments

Comments
 (0)