about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authoryukang <moorekang@gmail.com>2022-09-21 12:31:29 +0800
committeryukang <moorekang@gmail.com>2022-09-21 23:21:41 +0800
commit7adfb44b95335ce9a565aea1f5f32a3e14119f9c (patch)
tree96f87c6208221648767c92affdc48e2fa2a30a3c /compiler/rustc_resolve/src
parentf9ef7e2835b757129b9171c54a6ce948a4a210be (diff)
downloadrust-7adfb44b95335ce9a565aea1f5f32a3e14119f9c.tar.gz
rust-7adfb44b95335ce9a565aea1f5f32a3e14119f9c.zip
add trivial comments
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/late/diagnostics.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_resolve/src/late/diagnostics.rs b/compiler/rustc_resolve/src/late/diagnostics.rs
index ac115360257..7f3dc208521 100644
--- a/compiler/rustc_resolve/src/late/diagnostics.rs
+++ b/compiler/rustc_resolve/src/late/diagnostics.rs
@@ -130,6 +130,7 @@ pub(super) enum LifetimeElisionCandidate {
     Missing(MissingLifetime),
 }
 
+/// Only used for diagnostics.
 struct BaseError<'a> {
     msg: String,
     fallback_label: String,
@@ -313,7 +314,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
         }
 
         self.suggest_type_ascription(&mut err, source, path, res, span, &base_error);
-        self.add_err_code_cases(&mut err, source, path, span);
+        self.err_code_special_cases(&mut err, source, path, span);
 
         (err, candidates)
     }
@@ -667,7 +668,7 @@ impl<'a: 'ast, 'ast> LateResolutionVisitor<'a, '_, 'ast> {
         }
     }
 
-    fn add_err_code_cases(
+    fn err_code_special_cases(
         &mut self,
         err: &mut DiagnosticBuilder<'_, ErrorGuaranteed>,
         source: PathSource<'_>,