Skip to content

Commit

Permalink
add trivial comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Sep 21, 2022
1 parent f9ef7e2 commit 7adfb44
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions compiler/rustc_resolve/src/late/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ pub(super) enum LifetimeElisionCandidate {
Missing(MissingLifetime),
}

/// Only used for diagnostics.
struct BaseError<'a> {
msg: String,
fallback_label: String,
Expand Down Expand Up @@ -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)
}
Expand Down Expand Up @@ -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<'_>,
Expand Down

0 comments on commit 7adfb44

Please sign in to comment.