diff options
| author | Ivan Tham <pickfire@riseup.net> | 2019-11-25 08:14:10 +0800 |
|---|---|---|
| committer | Who? Me?! <mark-i-m@users.noreply.github.com> | 2019-11-26 17:14:05 -0600 |
| commit | 2810d33295998d5b199921c40ffa83d7e395bf82 (patch) | |
| tree | 31971ae7ac77d52c4bc890cf8c5a262bbb371e36 /src/doc/rustc-dev-guide | |
| parent | dcc452a13c49297502728e4b4a40716768cbea68 (diff) | |
| download | rust-2810d33295998d5b199921c40ffa83d7e395bf82.tar.gz rust-2810d33295998d5b199921c40ffa83d7e395bf82.zip | |
Fix typo
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/diagnostics.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/rustc-dev-guide/src/diagnostics.md b/src/doc/rustc-dev-guide/src/diagnostics.md index 9cfd5a3e198..040e7db01bd 100644 --- a/src/doc/rustc-dev-guide/src/diagnostics.md +++ b/src/doc/rustc-dev-guide/src/diagnostics.md @@ -60,7 +60,7 @@ let mut err = sess.struct_span_err(sp, "oh no! this is an error!"); if let Ok(snippet) = sess.source_map().span_to_snippet(sp) { // Use the snippet to generate a suggested fix - err.span_suggestion(suggestion_sp, "try using a qux here", format!("qux {}", snip)); + err.span_suggestion(suggestion_sp, "try using a qux here", format!("qux {}", snippet)); } else { // If we weren't able to generate a snippet, then emit a "help" message // instead of a concrete "suggestion". In practice this is unlikely to be @@ -100,7 +100,7 @@ if let Ok(snippet) = sess.source_map().span_to_snippet(sp) { err.span_suggestion( suggestion_sp, "try using a qux here", - format!("qux {}", snip), + format!("qux {}", snippet), Applicability::MachineApplicable, ); } else { |
