about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamy Kacimi <samy.kacimi@protonmail.ch>2019-07-23 21:26:01 +0200
committerSamy Kacimi <samy.kacimi@protonmail.ch>2019-07-23 23:09:59 +0200
commit66815c613a9eddd0728db8154181624894bd1ea9 (patch)
tree171a3cbf7cf4863e4d66a26ff3dc9e28d58f870d
parent3ebca72a11869f946b31f900faffb75c2bb2473a (diff)
downloadrust-66815c613a9eddd0728db8154181624894bd1ea9.tar.gz
rust-66815c613a9eddd0728db8154181624894bd1ea9.zip
normalize use of backticks for compiler messages in remaining modules
https://github.com/rust-lang/rust/issues/60532
-rw-r--r--src/librustc/error_codes.rs2
-rw-r--r--src/librustc/infer/lexical_region_resolve/mod.rs2
-rw-r--r--src/librustc/infer/region_constraints/leak_check.rs4
-rw-r--r--src/librustc/middle/entry.rs6
-rw-r--r--src/librustc/middle/mem_categorization.rs4
-rw-r--r--src/librustc/middle/resolve_lifetime.rs2
-rw-r--r--src/librustc/query/mod.rs6
-rw-r--r--src/librustc/session/config.rs14
-rw-r--r--src/librustc/traits/error_reporting.rs2
-rw-r--r--src/librustc_data_structures/flock.rs12
-rw-r--r--src/librustc_driver/pretty.rs4
-rw-r--r--src/librustc_passes/rvalue_promotion.rs10
-rw-r--r--src/librustc_resolve/build_reduced_graph.rs2
-rw-r--r--src/librustc_save_analysis/lib.rs8
-rw-r--r--src/librustc_target/spec/mod.rs2
-rw-r--r--src/test/ui/cross/cross-fn-cache-hole.stderr2
-rw-r--r--src/test/ui/deprecation/deprecated-macro_escape-inner.stderr2
-rw-r--r--src/test/ui/error-codes/E0137.stderr6
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr2
-rw-r--r--src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr2
-rw-r--r--src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr22
-rw-r--r--src/test/ui/multiple-main-2.rs2
-rw-r--r--src/test/ui/multiple-main-2.stderr6
-rw-r--r--src/test/ui/multiple-main-3.rs2
-rw-r--r--src/test/ui/multiple-main-3.stderr6
-rw-r--r--src/tools/tidy/src/features.rs2
-rw-r--r--src/tools/tidy/src/libcoretest.rs2
27 files changed, 68 insertions, 68 deletions
diff --git a/src/librustc/error_codes.rs b/src/librustc/error_codes.rs
index 65821d8dd83..655028324e1 100644
--- a/src/librustc/error_codes.rs
+++ b/src/librustc/error_codes.rs
@@ -485,7 +485,7 @@ Erroneous code example:
 fn foo() {}
 
 #[main]
-fn f() {} // error: multiple functions with a #[main] attribute
+fn f() {} // error: multiple functions with a `#[main]` attribute
 ```
 
 This error indicates that the compiler found multiple functions with the
diff --git a/src/librustc/infer/lexical_region_resolve/mod.rs b/src/librustc/infer/lexical_region_resolve/mod.rs
index d06c4434b3a..41d68d6e81f 100644
--- a/src/librustc/infer/lexical_region_resolve/mod.rs
+++ b/src/librustc/infer/lexical_region_resolve/mod.rs
@@ -873,7 +873,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
             constraints.retain(|constraint| {
                 let (edge_changed, retain) = body(constraint);
                 if edge_changed {
-                    debug!("Updated due to constraint {:?}", constraint);
+                    debug!("updated due to constraint {:?}", constraint);
                     changed = true;
                 }
                 retain
diff --git a/src/librustc/infer/region_constraints/leak_check.rs b/src/librustc/infer/region_constraints/leak_check.rs
index 30f6137289a..0c83bbc1e53 100644
--- a/src/librustc/infer/region_constraints/leak_check.rs
+++ b/src/librustc/infer/region_constraints/leak_check.rs
@@ -78,10 +78,10 @@ impl<'tcx> RegionConstraintCollector<'tcx> {
                 }
 
                 return Err(if overly_polymorphic {
-                    debug!("Overly polymorphic!");
+                    debug!("overly polymorphic!");
                     TypeError::RegionsOverlyPolymorphic(placeholder.name, tainted_region)
                 } else {
-                    debug!("Not as polymorphic!");
+                    debug!("not as polymorphic!");
                     TypeError::RegionsInsufficientlyPolymorphic(placeholder.name, tainted_region)
                 });
             }
diff --git a/src/librustc/middle/entry.rs b/src/librustc/middle/entry.rs
index cba4d0f1598..53c099c0b43 100644
--- a/src/librustc/middle/entry.rs
+++ b/src/librustc/middle/entry.rs
@@ -120,9 +120,9 @@ fn find_item(item: &Item, ctxt: &mut EntryContext<'_, '_>, at_root: bool) {
                 ctxt.attr_main_fn = Some((item.hir_id, item.span));
             } else {
                 struct_span_err!(ctxt.session, item.span, E0137,
-                                 "multiple functions with a #[main] attribute")
-                .span_label(item.span, "additional #[main] function")
-                .span_label(ctxt.attr_main_fn.unwrap().1, "first #[main] function")
+                                 "multiple functions with a `#[main]` attribute")
+                .span_label(item.span, "additional `#[main]` function")
+                .span_label(ctxt.attr_main_fn.unwrap().1, "first `#[main]` function")
                 .emit();
             }
         },
diff --git a/src/librustc/middle/mem_categorization.rs b/src/librustc/middle/mem_categorization.rs
index ddad276f8a7..524d5ddf929 100644
--- a/src/librustc/middle/mem_categorization.rs
+++ b/src/librustc/middle/mem_categorization.rs
@@ -994,7 +994,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
         let deref_ty = match base_cmt_ty.builtin_deref(true) {
             Some(mt) => mt.ty,
             None => {
-                debug!("Explicit deref of non-derefable type: {:?}", base_cmt_ty);
+                debug!("explicit deref of non-derefable type: {:?}", base_cmt_ty);
                 return Err(());
             }
         };
@@ -1317,7 +1317,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
                 let element_ty = match cmt.ty.builtin_index() {
                     Some(ty) => ty,
                     None => {
-                        debug!("Explicit index of non-indexable type {:?}", cmt);
+                        debug!("explicit index of non-indexable type {:?}", cmt);
                         return Err(());
                     }
                 };
diff --git a/src/librustc/middle/resolve_lifetime.rs b/src/librustc/middle/resolve_lifetime.rs
index beb8061842d..abb896a7c9b 100644
--- a/src/librustc/middle/resolve_lifetime.rs
+++ b/src/librustc/middle/resolve_lifetime.rs
@@ -1645,7 +1645,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
                     }
                 }
                 Some(LifetimeUseSet::Many) => {
-                    debug!("Not one use lifetime");
+                    debug!("not one use lifetime");
                 }
                 None => {
                     let hir_id = self.tcx.hir().as_local_hir_id(def_id).unwrap();
diff --git a/src/librustc/query/mod.rs b/src/librustc/query/mod.rs
index fba3e22ab1b..67fc3520745 100644
--- a/src/librustc/query/mod.rs
+++ b/src/librustc/query/mod.rs
@@ -643,11 +643,11 @@ rustc_queries! {
         }
         query is_sanitizer_runtime(_: CrateNum) -> bool {
             fatal_cycle
-            desc { "query a crate is #![sanitizer_runtime]" }
+            desc { "query a crate is `#![sanitizer_runtime]`" }
         }
         query is_profiler_runtime(_: CrateNum) -> bool {
             fatal_cycle
-            desc { "query a crate is #![profiler_runtime]" }
+            desc { "query a crate is `#![profiler_runtime]`" }
         }
         query panic_strategy(_: CrateNum) -> PanicStrategy {
             fatal_cycle
@@ -655,7 +655,7 @@ rustc_queries! {
         }
         query is_no_builtins(_: CrateNum) -> bool {
             fatal_cycle
-            desc { "test whether a crate has #![no_builtins]" }
+            desc { "test whether a crate has `#![no_builtins]`" }
         }
         query symbol_mangling_version(_: CrateNum) -> SymbolManglingVersion {
             fatal_cycle
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index db8e2f64e30..470a08fad23 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -1144,9 +1144,9 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
     lto: LtoCli = (LtoCli::Unspecified, parse_lto, [TRACKED],
         "perform LLVM link-time optimizations"),
     target_cpu: Option<String> = (None, parse_opt_string, [TRACKED],
-        "select target processor (rustc --print target-cpus for details)"),
+        "select target processor (`rustc --print target-cpus` for details)"),
     target_feature: String = (String::new(), parse_string, [TRACKED],
-        "target specific attributes (rustc --print target-features for details)"),
+        "target specific attributes (`rustc --print target-features` for details)"),
     passes: Vec<String> = (Vec::new(), parse_list, [TRACKED],
         "a list of extra LLVM passes to run (space separated)"),
     llvm_args: Vec<String> = (Vec::new(), parse_list, [TRACKED],
@@ -1172,9 +1172,9 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
     no_redzone: Option<bool> = (None, parse_opt_bool, [TRACKED],
         "disable the use of the redzone"),
     relocation_model: Option<String> = (None, parse_opt_string, [TRACKED],
-        "choose the relocation model to use (rustc --print relocation-models for details)"),
+        "choose the relocation model to use (`rustc --print relocation-models` for details)"),
     code_model: Option<String> = (None, parse_opt_string, [TRACKED],
-        "choose the code model to use (rustc --print code-models for details)"),
+        "choose the code model to use (`rustc --print code-models` for details)"),
     metadata: Vec<String> = (Vec::new(), parse_list, [TRACKED],
         "metadata to mangle symbol names with"),
     extra_filename: String = (String::new(), parse_string, [UNTRACKED],
@@ -1184,7 +1184,7 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
     remark: Passes = (Passes::Some(Vec::new()), parse_passes, [UNTRACKED],
         "print remarks for these optimization passes (space separated, or \"all\")"),
     no_stack_check: bool = (false, parse_bool, [UNTRACKED],
-        "the --no-stack-check flag is deprecated and does nothing"),
+        "the `--no-stack-check` flag is deprecated and does nothing"),
     debuginfo: Option<usize> = (None, parse_opt_uint, [TRACKED],
         "debug info emission level, 0 = no debug info, 1 = line tables only, \
          2 = full debug info with variable and type information"),
@@ -1400,9 +1400,9 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
     thinlto: Option<bool> = (None, parse_opt_bool, [TRACKED],
         "enable ThinLTO when possible"),
     inline_in_all_cgus: Option<bool> = (None, parse_opt_bool, [TRACKED],
-        "control whether #[inline] functions are in all cgus"),
+        "control whether `#[inline]` functions are in all CGUs"),
     tls_model: Option<String> = (None, parse_opt_string, [TRACKED],
-        "choose the TLS model to use (rustc --print tls-models for details)"),
+        "choose the TLS model to use (`rustc --print tls-models` for details)"),
     saturating_float_casts: bool = (false, parse_bool, [TRACKED],
         "make float->int casts UB-free: numbers outside the integer type's range are clipped to \
          the max/min integer respectively, and NaN is mapped to 0"),
diff --git a/src/librustc/traits/error_reporting.rs b/src/librustc/traits/error_reporting.rs
index 352d318ba79..14a288f5af1 100644
--- a/src/librustc/traits/error_reporting.rs
+++ b/src/librustc/traits/error_reporting.rs
@@ -1656,7 +1656,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
             ObligationCauseCode::TrivialBound => {
                 err.help("see issue #48214");
                 if tcx.sess.opts.unstable_features.is_nightly_build() {
-                    err.help("add #![feature(trivial_bounds)] to the \
+                    err.help("add `#![feature(trivial_bounds)]` to the \
                               crate attributes to enable",
                     );
                 }
diff --git a/src/librustc_data_structures/flock.rs b/src/librustc_data_structures/flock.rs
index b63701dbc09..b0bd137f2cc 100644
--- a/src/librustc_data_structures/flock.rs
+++ b/src/librustc_data_structures/flock.rs
@@ -238,14 +238,14 @@ cfg_if! {
                                 .write(true);
                 }
 
-                debug!("Attempting to open lock file `{}`", p.display());
+                debug!("attempting to open lock file `{}`", p.display());
                 let file = match open_options.open(p) {
                     Ok(file) => {
-                        debug!("Lock file opened successfully");
+                        debug!("lock file opened successfully");
                         file
                     }
                     Err(err) => {
-                        debug!("Error opening lock file: {}", err);
+                        debug!("error opening lock file: {}", err);
                         return Err(err)
                     }
                 };
@@ -262,7 +262,7 @@ cfg_if! {
                         dwFlags |= LOCKFILE_EXCLUSIVE_LOCK;
                     }
 
-                    debug!("Attempting to acquire lock on lock file `{}`",
+                    debug!("attempting to acquire lock on lock file `{}`",
                            p.display());
                     LockFileEx(file.as_raw_handle(),
                                dwFlags,
@@ -273,10 +273,10 @@ cfg_if! {
                 };
                 if ret == 0 {
                     let err = io::Error::last_os_error();
-                    debug!("Failed acquiring file lock: {}", err);
+                    debug!("failed acquiring file lock: {}", err);
                     Err(err)
                 } else {
-                    debug!("Successfully acquired lock.");
+                    debug!("successfully acquired lock");
                     Ok(Lock { _file: file })
                 }
             }
diff --git a/src/librustc_driver/pretty.rs b/src/librustc_driver/pretty.rs
index af000376044..cb17401f624 100644
--- a/src/librustc_driver/pretty.rs
+++ b/src/librustc_driver/pretty.rs
@@ -892,7 +892,7 @@ fn print_with_analysis(
                                 suffix (b::c::d)");
             let hir_id = tcx.hir().node_to_hir_id(nodeid);
             let node = tcx.hir().find(hir_id).unwrap_or_else(|| {
-                tcx.sess.fatal(&format!("--pretty flowgraph couldn't find id: {}", nodeid))
+                tcx.sess.fatal(&format!("`--pretty=flowgraph` couldn't find ID: {}", nodeid))
             });
 
             match blocks::Code::from_node(&tcx.hir(), hir_id) {
@@ -904,7 +904,7 @@ fn print_with_analysis(
                     print_flowgraph(variants, tcx, code, mode, out)
                 }
                 None => {
-                    let message = format!("--pretty=flowgraph needs block, fn, or method; \
+                    let message = format!("`--pretty=flowgraph` needs block, fn, or method; \
                                             got {:?}",
                                             node);
 
diff --git a/src/librustc_passes/rvalue_promotion.rs b/src/librustc_passes/rvalue_promotion.rs
index 8ba3a25e394..f2461f70161 100644
--- a/src/librustc_passes/rvalue_promotion.rs
+++ b/src/librustc_passes/rvalue_promotion.rs
@@ -311,7 +311,7 @@ fn check_expr_kind<'a, 'tcx>(
         }
         hir::ExprKind::Cast(ref from, _) => {
             let expr_promotability = v.check_expr(from);
-            debug!("Checking const cast(id={})", from.hir_id);
+            debug!("checking const cast(id={})", from.hir_id);
             let cast_in = CastTy::from_ty(v.tables.expr_ty(from));
             let cast_out = CastTy::from_ty(v.tables.expr_ty(e));
             match (cast_in, cast_out) {
@@ -338,15 +338,15 @@ fn check_expr_kind<'a, 'tcx>(
                     if v.in_static {
                         for attr in &v.tcx.get_attrs(did)[..] {
                             if attr.check_name(sym::thread_local) {
-                                debug!("Reference to Static(id={:?}) is unpromotable \
-                                       due to a #[thread_local] attribute", did);
+                                debug!("reference to `Static(id={:?})` is unpromotable \
+                                        due to a `#[thread_local]` attribute", did);
                                 return NotPromotable;
                             }
                         }
                         Promotable
                     } else {
-                        debug!("Reference to Static(id={:?}) is unpromotable as it is not \
-                               referenced from a static", did);
+                        debug!("reference to `Static(id={:?})` is unpromotable as it is not \
+                                referenced from a static", did);
                         NotPromotable
                     }
                 }
diff --git a/src/librustc_resolve/build_reduced_graph.rs b/src/librustc_resolve/build_reduced_graph.rs
index ee11228654b..cfba42580fc 100644
--- a/src/librustc_resolve/build_reduced_graph.rs
+++ b/src/librustc_resolve/build_reduced_graph.rs
@@ -898,7 +898,7 @@ impl<'a> Resolver<'a> {
                 let msg = "macro_escape is a deprecated synonym for macro_use";
                 let mut err = self.session.struct_span_warn(attr.span, msg);
                 if let ast::AttrStyle::Inner = attr.style {
-                    err.help("consider an outer attribute, #[macro_use] mod ...").emit();
+                    err.help("consider an outer attribute, `#[macro_use]` mod ...").emit();
                 } else {
                     err.emit();
                 }
diff --git a/src/librustc_save_analysis/lib.rs b/src/librustc_save_analysis/lib.rs
index 2c8f7a44f5a..c987a46b567 100644
--- a/src/librustc_save_analysis/lib.rs
+++ b/src/librustc_save_analysis/lib.rs
@@ -111,7 +111,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
             let span = match self.tcx.extern_crate(n.as_def_id()) {
                 Some(&ExternCrate { span, .. }) => span,
                 None => {
-                    debug!("Skipping crate {}, no data", n);
+                    debug!("skipping crate {}, no data", n);
                     continue;
                 }
             };
@@ -469,7 +469,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
                         )
                     }
                     None => {
-                        debug!("Could not find container for method {} at {:?}", id, span);
+                        debug!("could not find container for method {} at {:?}", id, span);
                         // This is not necessarily a bug, if there was a compilation error,
                         // the tables we need might not exist.
                         return None;
@@ -550,7 +550,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
                     }
                     ty::Tuple(..) => None,
                     _ => {
-                        debug!("Expected struct or union type, found {:?}", ty);
+                        debug!("expected struct or union type, found {:?}", ty);
                         None
                     }
                 }
@@ -580,7 +580,7 @@ impl<'l, 'tcx> SaveContext<'l, 'tcx> {
                 let method_id = match self.tables.type_dependent_def_id(expr_hir_id) {
                     Some(id) => id,
                     None => {
-                        debug!("Could not resolve method id for {:?}", expr);
+                        debug!("could not resolve method id for {:?}", expr);
                         return None;
                     }
                 };
diff --git a/src/librustc_target/spec/mod.rs b/src/librustc_target/spec/mod.rs
index 1fdc9b015ba..4765d1a0455 100644
--- a/src/librustc_target/spec/mod.rs
+++ b/src/librustc_target/spec/mod.rs
@@ -287,7 +287,7 @@ macro_rules! supported_targets {
                         // run-time that the parser works correctly
                         t = Target::from_json(t.to_json())
                             .map_err(LoadTargetError::Other)?;
-                        debug!("Got builtin target: {:?}", t);
+                        debug!("got builtin target: {:?}", t);
                         Ok(t)
                     },
                 )+
diff --git a/src/test/ui/cross/cross-fn-cache-hole.stderr b/src/test/ui/cross/cross-fn-cache-hole.stderr
index 3bedd0dac23..0d325bb7ec1 100644
--- a/src/test/ui/cross/cross-fn-cache-hole.stderr
+++ b/src/test/ui/cross/cross-fn-cache-hole.stderr
@@ -11,7 +11,7 @@ LL | | }
    | |_^ the trait `Bar<u32>` is not implemented for `i32`
    |
    = help: see issue #48214
-   = help: add #![feature(trivial_bounds)] to the crate attributes to enable
+   = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/deprecation/deprecated-macro_escape-inner.stderr b/src/test/ui/deprecation/deprecated-macro_escape-inner.stderr
index a2cd196b21f..1b69270d624 100644
--- a/src/test/ui/deprecation/deprecated-macro_escape-inner.stderr
+++ b/src/test/ui/deprecation/deprecated-macro_escape-inner.stderr
@@ -4,5 +4,5 @@ warning: macro_escape is a deprecated synonym for macro_use
 LL |     #![macro_escape]
    |     ^^^^^^^^^^^^^^^^
    |
-   = help: consider an outer attribute, #[macro_use] mod ...
+   = help: consider an outer attribute, `#[macro_use]` mod ...
 
diff --git a/src/test/ui/error-codes/E0137.stderr b/src/test/ui/error-codes/E0137.stderr
index a5f05d33a08..f4d5e10369a 100644
--- a/src/test/ui/error-codes/E0137.stderr
+++ b/src/test/ui/error-codes/E0137.stderr
@@ -1,11 +1,11 @@
-error[E0137]: multiple functions with a #[main] attribute
+error[E0137]: multiple functions with a `#[main]` attribute
   --> $DIR/E0137.rs:7:1
    |
 LL | fn foo() {}
-   | ----------- first #[main] function
+   | ----------- first `#[main]` function
 ...
 LL | fn f() {}
-   | ^^^^^^^^^ additional #[main] function
+   | ^^^^^^^^^ additional `#[main]` function
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr
index 94757c5a35a..a0b770e9711 100644
--- a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr
@@ -184,7 +184,7 @@ warning: macro_escape is a deprecated synonym for macro_use
 LL |     mod inner { #![macro_escape] }
    |                 ^^^^^^^^^^^^^^^^
    |
-   = help: consider an outer attribute, #[macro_use] mod ...
+   = help: consider an outer attribute, `#[macro_use]` mod ...
 
 warning: the feature `rust1` has been stable since 1.0.0 and no longer requires an attribute to enable
   --> $DIR/issue-43106-gating-of-builtin-attrs.rs:89:12
diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr
index 9fb9633d9a8..8575c1660c5 100644
--- a/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr
+++ b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr
@@ -4,5 +4,5 @@ warning: macro_escape is a deprecated synonym for macro_use
 LL | #![macro_escape]
    | ^^^^^^^^^^^^^^^^
    |
-   = help: consider an outer attribute, #[macro_use] mod ...
+   = help: consider an outer attribute, `#[macro_use]` mod ...
 
diff --git a/src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr b/src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr
index 1d346fd42ff..b4d4c992c90 100644
--- a/src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr
+++ b/src/test/ui/feature-gates/feature-gate-trivial_bounds.stderr
@@ -5,7 +5,7 @@ LL | enum E where i32: Foo { V }
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
    |
    = help: see issue #48214
-   = help: add #![feature(trivial_bounds)] to the crate attributes to enable
+   = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
 
 error[E0277]: the trait bound `i32: Foo` is not satisfied
   --> $DIR/feature-gate-trivial_bounds.rs:12:1
@@ -14,7 +14,7 @@ LL | struct S where i32: Foo;
    | ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
    |
    = help: see issue #48214
-   = help: add #![feature(trivial_bounds)] to the crate attributes to enable
+   = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
 
 error[E0277]: the trait bound `i32: Foo` is not satisfied
   --> $DIR/feature-gate-trivial_bounds.rs:14:1
@@ -23,7 +23,7 @@ LL | trait T where i32: Foo {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
    |
    = help: see issue #48214
-   = help: add #![feature(trivial_bounds)] to the crate attributes to enable
+   = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
 
 error[E0277]: the trait bound `i32: Foo` is not satisfied
   --> $DIR/feature-gate-trivial_bounds.rs:16:1
@@ -32,7 +32,7 @@ LL | union U where i32: Foo { f: i32 }
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Foo` is not implemented for `i32`
    |
    = help: see issue #48214
-   = help: add #![feature(trivial_bounds)] to the crate attributes to enable
+   = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
 
 error[E0277]: the trait bound `i32: Foo` is not satisfied
   --> $DIR/feature-gate-trivial_bounds.rs:20:1
@@ -47,7 +47,7 @@ LL | | }
    | |_^ the trait `Foo` is not implemented for `i32`
    |
    = help: see issue #48214
-   = help: add #![feature(trivial_bounds)] to the crate attributes to enable
+   = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
 
 error[E0277]: the trait bound `i32: Foo` is not satisfied
   --> $DIR/feature-gate-trivial_bounds.rs:28:1
@@ -62,7 +62,7 @@ LL | | }
    | |_^ the trait `Foo` is not implemented for `i32`
    |
    = help: see issue #48214
-   = help: add #![feature(trivial_bounds)] to the crate attributes to enable
+   = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
 
 error[E0277]: the trait bound `std::string::String: std::ops::Neg` is not satisfied
   --> $DIR/feature-gate-trivial_bounds.rs:36:1
@@ -73,7 +73,7 @@ LL | | }
    | |_^ the trait `std::ops::Neg` is not implemented for `std::string::String`
    |
    = help: see issue #48214
-   = help: add #![feature(trivial_bounds)] to the crate attributes to enable
+   = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
 
 error[E0277]: `i32` is not an iterator
   --> $DIR/feature-gate-trivial_bounds.rs:40:1
@@ -86,7 +86,7 @@ LL | | }
    = help: the trait `std::iter::Iterator` is not implemented for `i32`
    = note: if you want to iterate between `start` until a value `end`, use the exclusive range syntax `start..end` or the inclusive range syntax `start..=end`
    = help: see issue #48214
-   = help: add #![feature(trivial_bounds)] to the crate attributes to enable
+   = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/feature-gate-trivial_bounds.rs:52:1
@@ -97,7 +97,7 @@ LL | struct TwoStrs(str, str) where str: Sized;
    = help: the trait `std::marker::Sized` is not implemented for `str`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
    = help: see issue #48214
-   = help: add #![feature(trivial_bounds)] to the crate attributes to enable
+   = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
 
 error[E0277]: the size for values of type `(dyn A + 'static)` cannot be known at compilation time
   --> $DIR/feature-gate-trivial_bounds.rs:55:1
@@ -111,7 +111,7 @@ LL | | }
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
    = note: required because it appears within the type `Dst<(dyn A + 'static)>`
    = help: see issue #48214
-   = help: add #![feature(trivial_bounds)] to the crate attributes to enable
+   = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/feature-gate-trivial_bounds.rs:59:1
@@ -124,7 +124,7 @@ LL | | }
    = help: the trait `std::marker::Sized` is not implemented for `str`
    = note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
    = help: see issue #48214
-   = help: add #![feature(trivial_bounds)] to the crate attributes to enable
+   = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
 
 error: aborting due to 11 previous errors
 
diff --git a/src/test/ui/multiple-main-2.rs b/src/test/ui/multiple-main-2.rs
index 6bae664ab74..e4685b1e004 100644
--- a/src/test/ui/multiple-main-2.rs
+++ b/src/test/ui/multiple-main-2.rs
@@ -5,5 +5,5 @@ fn bar() {
 }
 
 #[main]
-fn foo() { //~ ERROR multiple functions with a #[main] attribute
+fn foo() { //~ ERROR multiple functions with a `#[main]` attribute
 }
diff --git a/src/test/ui/multiple-main-2.stderr b/src/test/ui/multiple-main-2.stderr
index ae33e01cd26..24bc9a8878b 100644
--- a/src/test/ui/multiple-main-2.stderr
+++ b/src/test/ui/multiple-main-2.stderr
@@ -1,13 +1,13 @@
-error[E0137]: multiple functions with a #[main] attribute
+error[E0137]: multiple functions with a `#[main]` attribute
   --> $DIR/multiple-main-2.rs:8:1
    |
 LL | / fn bar() {
 LL | | }
-   | |_- first #[main] function
+   | |_- first `#[main]` function
 ...
 LL | / fn foo() {
 LL | | }
-   | |_^ additional #[main] function
+   | |_^ additional `#[main]` function
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/multiple-main-3.rs b/src/test/ui/multiple-main-3.rs
index dbcf1ef4896..d1b5ae9a833 100644
--- a/src/test/ui/multiple-main-3.rs
+++ b/src/test/ui/multiple-main-3.rs
@@ -6,6 +6,6 @@ fn main1() {
 
 mod foo {
     #[main]
-    fn main2() { //~ ERROR multiple functions with a #[main] attribute
+    fn main2() { //~ ERROR multiple functions with a `#[main]` attribute
     }
 }
diff --git a/src/test/ui/multiple-main-3.stderr b/src/test/ui/multiple-main-3.stderr
index b85637b8a56..ec171b76a28 100644
--- a/src/test/ui/multiple-main-3.stderr
+++ b/src/test/ui/multiple-main-3.stderr
@@ -1,13 +1,13 @@
-error[E0137]: multiple functions with a #[main] attribute
+error[E0137]: multiple functions with a `#[main]` attribute
   --> $DIR/multiple-main-3.rs:9:5
    |
 LL | / fn main1() {
 LL | | }
-   | |_- first #[main] function
+   | |_- first `#[main]` function
 ...
 LL | /     fn main2() {
 LL | |     }
-   | |_____^ additional #[main] function
+   | |_____^ additional `#[main]` function
 
 error: aborting due to previous error
 
diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs
index 1841beb1fd1..6a728b02f92 100644
--- a/src/tools/tidy/src/features.rs
+++ b/src/tools/tidy/src/features.rs
@@ -143,7 +143,7 @@ pub fn check(path: &Path, bad: &mut bool, verbose: bool) -> CollectedFeatures {
         println!("Expected a gate test for the feature '{}'.", name);
         println!("Hint: create a failing test file named 'feature-gate-{}.rs'\
                 \n      in the 'ui' test suite, with its failures due to\
-                \n      missing usage of #![feature({})].", name, name);
+                \n      missing usage of `#![feature({})]`.", name, name);
         println!("Hint: If you already have such a test and don't want to rename it,\
                 \n      you can also add a // gate-test-{} line to the test file.",
                  name);
diff --git a/src/tools/tidy/src/libcoretest.rs b/src/tools/tidy/src/libcoretest.rs
index 58c6aa12dc4..579a20e1142 100644
--- a/src/tools/tidy/src/libcoretest.rs
+++ b/src/tools/tidy/src/libcoretest.rs
@@ -17,7 +17,7 @@ pub fn check(path: &Path, bad: &mut bool) {
                 if !contents.starts_with("//") && contents.contains("#[test]") {
                     tidy_error!(
                         bad,
-                        "{} contains #[test]; libcore tests must be placed inside \
+                        "`{}` contains `#[test]`; libcore tests must be placed inside \
                         `src/libcore/tests/`",
                         subpath.display()
                     );