diff options
| author | Taylor Cramer <cramertj@google.com> | 2018-06-06 15:50:59 -0700 |
|---|---|---|
| committer | Taylor Cramer <cramertj@google.com> | 2018-06-21 22:36:36 -0700 |
| commit | cf844b547dbec1f23982fca8e07ec65800ed5d6d (patch) | |
| tree | a5420599dea5829f105d2a12bb14a3102141a749 /src/libsyntax/test.rs | |
| parent | 589446e19cbf7a2c7eddf80b490992d31134015c (diff) | |
| download | rust-cf844b547dbec1f23982fca8e07ec65800ed5d6d.tar.gz rust-cf844b547dbec1f23982fca8e07ec65800ed5d6d.zip | |
async await desugaring and tests
Diffstat (limited to 'src/libsyntax/test.rs')
| -rw-r--r-- | src/libsyntax/test.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/libsyntax/test.rs b/src/libsyntax/test.rs index cfb29f562d7..77225585141 100644 --- a/src/libsyntax/test.rs +++ b/src/libsyntax/test.rs @@ -127,11 +127,17 @@ impl<'a> fold::Folder for TestHarnessGenerator<'a> { ast::ItemKind::Fn(_, header, _, _) => { if header.unsafety == ast::Unsafety::Unsafe { let diag = self.cx.span_diagnostic; - diag.span_fatal(i.span, "unsafe functions cannot be used for tests").raise(); + diag.span_fatal( + i.span, + "unsafe functions cannot be used for tests" + ).raise(); } - if header.asyncness == ast::IsAsync::Async { + if header.asyncness.is_async() { let diag = self.cx.span_diagnostic; - diag.span_fatal(i.span, "async functions cannot be used for tests").raise(); + diag.span_fatal( + i.span, + "async functions cannot be used for tests" + ).raise(); } } _ => {}, |
