4452: Use back ticks instead of single quotes around code r=matklad a=tspiteri

Also, use back ticks instead of single quotes in `rustc_unescape_error_to_string` for `EE:UnclosedUnicodeEscape`.

Co-authored-by: Trevor Spiteri <tspiteri@ieee.org>
This commit is contained in:
bors[bot] 2020-05-13 23:10:05 +00:00 committed by GitHub
commit 62730ae30d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ pub(crate) fn add_custom_impl(acc: &mut Assists, ctx: &AssistContext) -> Option<
let start_offset = annotated.syntax().parent()?.text_range().end();
let label =
format!("Add custom impl '{}' for '{}'", trait_token.text().as_str(), annotated_name);
format!("Add custom impl `{}` for `{}`", trait_token.text().as_str(), annotated_name);
let target = attr.syntax().text_range();
acc.add(AssistId("add_custom_impl"), label, target, |edit| {

View File

@ -61,7 +61,7 @@ pub(crate) fn add_explicit_type(acc: &mut Assists, ctx: &AssistContext) -> Optio
let inferred_type = ty.display_source_code(ctx.db, module.into()).ok()?;
acc.add(
AssistId("add_explicit_type"),
format!("Insert explicit type '{}'", inferred_type),
format!("Insert explicit type `{}`", inferred_type),
pat_range,
|builder| match ascribed_ty {
Some(ascribed_ty) => {

View File

@ -157,7 +157,7 @@ impl FlycheckThread {
CheckEvent::Begin => {
task_send
.send(CheckTask::Status(WorkDoneProgress::Begin(WorkDoneProgressBegin {
title: "Running 'cargo check'".to_string(),
title: "Running `cargo check`".to_string(),
cancellable: Some(false),
message: None,
percentage: None,

View File

@ -54,7 +54,7 @@ fn rustc_unescape_error_to_string(err: unescape::EscapeError) -> &'static str {
"Unicode escape must not be empty"
}
EE::UnclosedUnicodeEscape => {
"Missing '}' to terminate the unicode escape"
"Missing `}` to terminate the unicode escape"
}
EE::LeadingUnderscoreUnicodeEscape => {
"Unicode escape code must not begin with an underscore"