bail in collect_trait_impl_trait_tys if signatures reference errors
This commit is contained in:
parent
ba64ba8b0d
commit
bcaf210575
3 changed files with 44 additions and 0 deletions
16
src/test/ui/async-await/in-trait/bad-signatures.rs
Normal file
16
src/test/ui/async-await/in-trait/bad-signatures.rs
Normal file
|
@ -0,0 +1,16 @@
|
|||
// edition:2021
|
||||
|
||||
#![feature(async_fn_in_trait)]
|
||||
//~^ WARN the feature `async_fn_in_trait` is incomplete
|
||||
|
||||
trait MyTrait {
|
||||
async fn bar(&abc self);
|
||||
//~^ ERROR expected identifier, found keyword `self`
|
||||
//~| ERROR expected one of `:`, `@`, or `|`, found keyword `self`
|
||||
}
|
||||
|
||||
impl MyTrait for () {
|
||||
async fn bar(&self) {}
|
||||
}
|
||||
|
||||
fn main() {}
|
Loading…
Add table
Add a link
Reference in a new issue