Talk about gen fn
in diagnostics about gen fn
This commit is contained in:
parent
91bbdd927a
commit
745c600617
5 changed files with 8 additions and 8 deletions
|
@ -521,9 +521,9 @@ pub(crate) struct CatchAfterTry {
|
|||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(parse_gen_block)]
|
||||
#[diag(parse_gen_fn)]
|
||||
#[help]
|
||||
pub(crate) struct GenBlock {
|
||||
pub(crate) struct GenFn {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
}
|
||||
|
|
|
@ -2372,7 +2372,7 @@ impl<'a> Parser<'a> {
|
|||
}
|
||||
|
||||
if let Gen::Yes { span, .. } = genness {
|
||||
self.sess.emit_err(errors::GenBlock { span });
|
||||
self.sess.emit_err(errors::GenFn { span });
|
||||
}
|
||||
|
||||
if !self.eat_keyword_case(kw::Fn, case) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue