mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Use back ticks instead of single quotes around code
This commit is contained in:
parent
530a35f3f9
commit
2d0a949236
4 changed files with 4 additions and 4 deletions
|
@ -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 start_offset = annotated.syntax().parent()?.text_range().end();
|
||||||
|
|
||||||
let label =
|
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();
|
let target = attr.syntax().text_range();
|
||||||
acc.add(AssistId("add_custom_impl"), label, target, |edit| {
|
acc.add(AssistId("add_custom_impl"), label, target, |edit| {
|
||||||
|
|
|
@ -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()?;
|
let inferred_type = ty.display_source_code(ctx.db, module.into()).ok()?;
|
||||||
acc.add(
|
acc.add(
|
||||||
AssistId("add_explicit_type"),
|
AssistId("add_explicit_type"),
|
||||||
format!("Insert explicit type '{}'", inferred_type),
|
format!("Insert explicit type `{}`", inferred_type),
|
||||||
pat_range,
|
pat_range,
|
||||||
|builder| match ascribed_ty {
|
|builder| match ascribed_ty {
|
||||||
Some(ascribed_ty) => {
|
Some(ascribed_ty) => {
|
||||||
|
|
|
@ -157,7 +157,7 @@ impl FlycheckThread {
|
||||||
CheckEvent::Begin => {
|
CheckEvent::Begin => {
|
||||||
task_send
|
task_send
|
||||||
.send(CheckTask::Status(WorkDoneProgress::Begin(WorkDoneProgressBegin {
|
.send(CheckTask::Status(WorkDoneProgress::Begin(WorkDoneProgressBegin {
|
||||||
title: "Running 'cargo check'".to_string(),
|
title: "Running `cargo check`".to_string(),
|
||||||
cancellable: Some(false),
|
cancellable: Some(false),
|
||||||
message: None,
|
message: None,
|
||||||
percentage: None,
|
percentage: None,
|
||||||
|
|
|
@ -54,7 +54,7 @@ fn rustc_unescape_error_to_string(err: unescape::EscapeError) -> &'static str {
|
||||||
"Unicode escape must not be empty"
|
"Unicode escape must not be empty"
|
||||||
}
|
}
|
||||||
EE::UnclosedUnicodeEscape => {
|
EE::UnclosedUnicodeEscape => {
|
||||||
"Missing '}' to terminate the unicode escape"
|
"Missing `}` to terminate the unicode escape"
|
||||||
}
|
}
|
||||||
EE::LeadingUnderscoreUnicodeEscape => {
|
EE::LeadingUnderscoreUnicodeEscape => {
|
||||||
"Unicode escape code must not begin with an underscore"
|
"Unicode escape code must not begin with an underscore"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue