Add help assertion for async pub test

This commit is contained in:
Ivan Tham 2020-09-18 00:56:04 +08:00
parent 9321efd8f7
commit c44a5feb05
6 changed files with 6 additions and 0 deletions

View File

@ -3,4 +3,5 @@
mod t {
async pub fn t() {}
//~^ ERROR expected one of `extern`, `fn`, or `unsafe`, found keyword `pub`
//~| HELP visibility `pub` must come before `async`
}

View File

@ -3,4 +3,5 @@
mod t {
const async unsafe pub fn t() {}
//~^ ERROR expected one of `extern` or `fn`, found keyword `pub`
//~| HELP visibility `pub` must come before `const async unsafe`
}

View File

@ -3,4 +3,5 @@
mod t {
const async pub fn t() {}
//~^ ERROR expected one of `extern`, `fn`, or `unsafe`, found keyword `pub`
//~| HELP visibility `pub` must come before `const async`
}

View File

@ -3,4 +3,5 @@
mod t {
const pub fn t() {}
//~^ ERROR expected one of `async`, `extern`, `fn`, or `unsafe`, found keyword `pub`
//~| HELP visibility `pub` must come before `const`
}

View File

@ -3,4 +3,5 @@
mod t {
unsafe pub(crate) fn t() {}
//~^ ERROR expected one of `extern` or `fn`, found keyword `pub`
//~| HELP visibility `pub(crate)` must come before `unsafe`
}

View File

@ -3,4 +3,5 @@
mod t {
unsafe pub fn t() {}
//~^ ERROR expected one of `extern` or `fn`, found keyword `pub`
//~| HELP visibility `pub` must come before `unsafe`
}