about summary refs log tree commit diff
path: root/compiler/rustc_infer/src/errors.rs
diff options
context:
space:
mode:
authorNikita Tomashevich <quant3234@gmail.com>2022-08-22 00:17:46 +0300
committerNikita Tomashevich <quant3234@gmail.com>2022-08-23 14:47:08 +0300
commit3f6cb475f7aa1f4475fdb313316a7df644113376 (patch)
treee4013abec9af54d14d7039fa2ac3e2a78f41da34 /compiler/rustc_infer/src/errors.rs
parent7e4f4337203b247bdbfbb0661e59ab1aa3bee3f1 (diff)
downloadrust-3f6cb475f7aa1f4475fdb313316a7df644113376.tar.gz
rust-3f6cb475f7aa1f4475fdb313316a7df644113376.zip
Use GeneratorKind::descr() instead of it's Display impl
Those are basically the same but the first one seems to fit better
Diffstat (limited to 'compiler/rustc_infer/src/errors.rs')
-rw-r--r--compiler/rustc_infer/src/errors.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_infer/src/errors.rs b/compiler/rustc_infer/src/errors.rs
index 7bd418ddf5f..51993f37bb3 100644
--- a/compiler/rustc_infer/src/errors.rs
+++ b/compiler/rustc_infer/src/errors.rs
@@ -73,7 +73,7 @@ pub struct AmbigousReturn<'a> {
 pub struct NeedTypeInfoInGenerator<'a> {
     #[primary_span]
     pub span: Span,
-    pub generator_kind: String,
+    pub generator_kind: &'static str,
     #[subdiagnostic]
     pub bad_label: InferenceBadError<'a>,
 }