Skip to content

Commit d663003

Browse files
committed
fix comment typo, CodeSuggestion path in doc comment
`CodeSuggestion` doesn't live in the `diagnostic` module.
1 parent b7041bf commit d663003

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/librustc_errors/diagnostic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ impl Diagnostic {
208208
/// Prints out a message with a suggested edit of the code. If the suggestion is presented
209209
/// inline it will only show the text message and not the text.
210210
///
211-
/// See `diagnostic::CodeSuggestion` for more information.
211+
/// See `CodeSuggestion` for more information.
212212
pub fn span_suggestion_short(&mut self, sp: Span, msg: &str, suggestion: String) -> &mut Self {
213213
self.suggestions.push(CodeSuggestion {
214214
substitution_parts: vec![Substitution {
@@ -235,7 +235,7 @@ impl Diagnostic {
235235
/// * may look like "to do xyz, use" or "to do xyz, use abc"
236236
/// * may contain a name of a function, variable or type, but not whole expressions
237237
///
238-
/// See `diagnostic::CodeSuggestion` for more information.
238+
/// See `CodeSuggestion` for more information.
239239
pub fn span_suggestion(&mut self, sp: Span, msg: &str, suggestion: String) -> &mut Self {
240240
self.suggestions.push(CodeSuggestion {
241241
substitution_parts: vec![Substitution {

src/librustc_errors/emitter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl Emitter for EmitterWriter {
4848
sugg.substitution_parts[0].substitutions[0].find('\n').is_none() {
4949
let substitution = &sugg.substitution_parts[0].substitutions[0];
5050
let msg = if substitution.len() == 0 || !sugg.show_code_when_inline {
51-
// This substitution is only removal or we explicitely don't want to show the
51+
// This substitution is only removal or we explicitly don't want to show the
5252
// code inline, don't show it
5353
format!("help: {}", sugg.msg)
5454
} else {

0 commit comments

Comments
 (0)