Skip to content

Commit

Permalink
suspend -> yield
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-schievink committed Feb 16, 2020
1 parent 759526e commit bb482eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/librustc/mir/mod.rs
Expand Up @@ -1475,9 +1475,7 @@ impl<'tcx> TerminatorKind<'tcx> {
GeneratorDrop => write!(fmt, "generator_drop"),
Resume => write!(fmt, "resume"),
Abort => write!(fmt, "abort"),
Yield { value, resume_arg, .. } => {
write!(fmt, "{:?} = suspend({:?})", resume_arg, value)
}
Yield { value, resume_arg, .. } => write!(fmt, "{:?} = yield({:?})", resume_arg, value),
Unreachable => write!(fmt, "unreachable"),
Drop { location, .. } => write!(fmt, "drop({:?})", location),
DropAndReplace { location, value, .. } => {
Expand Down
2 changes: 1 addition & 1 deletion src/test/mir-opt/generator-storage-dead-unwind.rs
Expand Up @@ -49,7 +49,7 @@ fn main() {
// StorageLive(_4);
// _4 = Bar(const 6i32,);
// ...
// _5 = suspend(move _6) -> [resume: bb2, drop: bb4];
// _5 = yield(move _6) -> [resume: bb2, drop: bb4];
// }
// bb1 (cleanup): {
// resume;
Expand Down

0 comments on commit bb482eb

Please sign in to comment.