Use GeneratorKind::descr() instead of it's Display impl
Those are basically the same but the first one seems to fit better
This commit is contained in:
parent
7e4f433720
commit
3f6cb475f7
2 changed files with 2 additions and 2 deletions
|
@ -73,7 +73,7 @@ pub struct AmbigousReturn<'a> {
|
||||||
pub struct NeedTypeInfoInGenerator<'a> {
|
pub struct NeedTypeInfoInGenerator<'a> {
|
||||||
#[primary_span]
|
#[primary_span]
|
||||||
pub span: Span,
|
pub span: Span,
|
||||||
pub generator_kind: String,
|
pub generator_kind: &'static str,
|
||||||
#[subdiagnostic]
|
#[subdiagnostic]
|
||||||
pub bad_label: InferenceBadError<'a>,
|
pub bad_label: InferenceBadError<'a>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -568,7 +568,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
|
||||||
NeedTypeInfoInGenerator {
|
NeedTypeInfoInGenerator {
|
||||||
bad_label: data.make_bad_error(span),
|
bad_label: data.make_bad_error(span),
|
||||||
span,
|
span,
|
||||||
generator_kind: kind.to_string(),
|
generator_kind: kind.descr(),
|
||||||
}
|
}
|
||||||
.into_diagnostic(&self.tcx.sess.parse_sess)
|
.into_diagnostic(&self.tcx.sess.parse_sess)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue