1
Fork 0

Address code review feedback

This commit is contained in:
Eric Holk 2023-12-04 13:43:38 -08:00
parent 26f9954971
commit 50ef8006eb
No known key found for this signature in database
GPG key ID: 8EA6B43ED4CE0911
10 changed files with 53 additions and 36 deletions

View file

@ -545,6 +545,10 @@ fn check_test_signature(
return Err(sd.emit_err(errors::TestBadFn { span: i.span, cause: span, kind: "async" }));
}
if let Some(ast::CoroutineKind::Gen { span, .. }) = f.sig.header.coro_kind {
return Err(sd.emit_err(errors::TestBadFn { span: i.span, cause: span, kind: "gen" }));
}
// If the termination trait is active, the compiler will check that the output
// type implements the `Termination` trait as `libtest` enforces that.
let has_output = match &f.sig.decl.output {