Skip to content

Commit 27a6a30

Browse files
committed
Auto merge of #62908 - fakenine:normalize_use_of_backticks_compiler_messages_p17, r=alexreg
normalize use of backticks for compiler messages in remaining modules #60532
2 parents a7f2867 + 66815c6 commit 27a6a30

File tree

27 files changed

+68
-68
lines changed

27 files changed

+68
-68
lines changed

src/librustc/error_codes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ Erroneous code example:
485485
fn foo() {}
486486
487487
#[main]
488-
fn f() {} // error: multiple functions with a #[main] attribute
488+
fn f() {} // error: multiple functions with a `#[main]` attribute
489489
```
490490
491491
This error indicates that the compiler found multiple functions with the

src/librustc/infer/lexical_region_resolve/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
874874
constraints.retain(|constraint| {
875875
let (edge_changed, retain) = body(constraint);
876876
if edge_changed {
877-
debug!("Updated due to constraint {:?}", constraint);
877+
debug!("updated due to constraint {:?}", constraint);
878878
changed = true;
879879
}
880880
retain

src/librustc/infer/region_constraints/leak_check.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ impl<'tcx> RegionConstraintCollector<'tcx> {
7878
}
7979

8080
return Err(if overly_polymorphic {
81-
debug!("Overly polymorphic!");
81+
debug!("overly polymorphic!");
8282
TypeError::RegionsOverlyPolymorphic(placeholder.name, tainted_region)
8383
} else {
84-
debug!("Not as polymorphic!");
84+
debug!("not as polymorphic!");
8585
TypeError::RegionsInsufficientlyPolymorphic(placeholder.name, tainted_region)
8686
});
8787
}

src/librustc/middle/entry.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ fn find_item(item: &Item, ctxt: &mut EntryContext<'_, '_>, at_root: bool) {
120120
ctxt.attr_main_fn = Some((item.hir_id, item.span));
121121
} else {
122122
struct_span_err!(ctxt.session, item.span, E0137,
123-
"multiple functions with a #[main] attribute")
124-
.span_label(item.span, "additional #[main] function")
125-
.span_label(ctxt.attr_main_fn.unwrap().1, "first #[main] function")
123+
"multiple functions with a `#[main]` attribute")
124+
.span_label(item.span, "additional `#[main]` function")
125+
.span_label(ctxt.attr_main_fn.unwrap().1, "first `#[main]` function")
126126
.emit();
127127
}
128128
},

src/librustc/middle/mem_categorization.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
994994
let deref_ty = match base_cmt_ty.builtin_deref(true) {
995995
Some(mt) => mt.ty,
996996
None => {
997-
debug!("Explicit deref of non-derefable type: {:?}", base_cmt_ty);
997+
debug!("explicit deref of non-derefable type: {:?}", base_cmt_ty);
998998
return Err(());
999999
}
10001000
};
@@ -1317,7 +1317,7 @@ impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
13171317
let element_ty = match cmt.ty.builtin_index() {
13181318
Some(ty) => ty,
13191319
None => {
1320-
debug!("Explicit index of non-indexable type {:?}", cmt);
1320+
debug!("explicit index of non-indexable type {:?}", cmt);
13211321
return Err(());
13221322
}
13231323
};

src/librustc/middle/resolve_lifetime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1645,7 +1645,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
16451645
}
16461646
}
16471647
Some(LifetimeUseSet::Many) => {
1648-
debug!("Not one use lifetime");
1648+
debug!("not one use lifetime");
16491649
}
16501650
None => {
16511651
let hir_id = self.tcx.hir().as_local_hir_id(def_id).unwrap();

src/librustc/query/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -643,19 +643,19 @@ rustc_queries! {
643643
}
644644
query is_sanitizer_runtime(_: CrateNum) -> bool {
645645
fatal_cycle
646-
desc { "query a crate is #![sanitizer_runtime]" }
646+
desc { "query a crate is `#![sanitizer_runtime]`" }
647647
}
648648
query is_profiler_runtime(_: CrateNum) -> bool {
649649
fatal_cycle
650-
desc { "query a crate is #![profiler_runtime]" }
650+
desc { "query a crate is `#![profiler_runtime]`" }
651651
}
652652
query panic_strategy(_: CrateNum) -> PanicStrategy {
653653
fatal_cycle
654654
desc { "query a crate's configured panic strategy" }
655655
}
656656
query is_no_builtins(_: CrateNum) -> bool {
657657
fatal_cycle
658-
desc { "test whether a crate has #![no_builtins]" }
658+
desc { "test whether a crate has `#![no_builtins]`" }
659659
}
660660
query symbol_mangling_version(_: CrateNum) -> SymbolManglingVersion {
661661
fatal_cycle

src/librustc/session/config.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,9 +1144,9 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
11441144
lto: LtoCli = (LtoCli::Unspecified, parse_lto, [TRACKED],
11451145
"perform LLVM link-time optimizations"),
11461146
target_cpu: Option<String> = (None, parse_opt_string, [TRACKED],
1147-
"select target processor (rustc --print target-cpus for details)"),
1147+
"select target processor (`rustc --print target-cpus` for details)"),
11481148
target_feature: String = (String::new(), parse_string, [TRACKED],
1149-
"target specific attributes (rustc --print target-features for details)"),
1149+
"target specific attributes (`rustc --print target-features` for details)"),
11501150
passes: Vec<String> = (Vec::new(), parse_list, [TRACKED],
11511151
"a list of extra LLVM passes to run (space separated)"),
11521152
llvm_args: Vec<String> = (Vec::new(), parse_list, [TRACKED],
@@ -1172,9 +1172,9 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
11721172
no_redzone: Option<bool> = (None, parse_opt_bool, [TRACKED],
11731173
"disable the use of the redzone"),
11741174
relocation_model: Option<String> = (None, parse_opt_string, [TRACKED],
1175-
"choose the relocation model to use (rustc --print relocation-models for details)"),
1175+
"choose the relocation model to use (`rustc --print relocation-models` for details)"),
11761176
code_model: Option<String> = (None, parse_opt_string, [TRACKED],
1177-
"choose the code model to use (rustc --print code-models for details)"),
1177+
"choose the code model to use (`rustc --print code-models` for details)"),
11781178
metadata: Vec<String> = (Vec::new(), parse_list, [TRACKED],
11791179
"metadata to mangle symbol names with"),
11801180
extra_filename: String = (String::new(), parse_string, [UNTRACKED],
@@ -1184,7 +1184,7 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
11841184
remark: Passes = (Passes::Some(Vec::new()), parse_passes, [UNTRACKED],
11851185
"print remarks for these optimization passes (space separated, or \"all\")"),
11861186
no_stack_check: bool = (false, parse_bool, [UNTRACKED],
1187-
"the --no-stack-check flag is deprecated and does nothing"),
1187+
"the `--no-stack-check` flag is deprecated and does nothing"),
11881188
debuginfo: Option<usize> = (None, parse_opt_uint, [TRACKED],
11891189
"debug info emission level, 0 = no debug info, 1 = line tables only, \
11901190
2 = full debug info with variable and type information"),
@@ -1400,9 +1400,9 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
14001400
thinlto: Option<bool> = (None, parse_opt_bool, [TRACKED],
14011401
"enable ThinLTO when possible"),
14021402
inline_in_all_cgus: Option<bool> = (None, parse_opt_bool, [TRACKED],
1403-
"control whether #[inline] functions are in all cgus"),
1403+
"control whether `#[inline]` functions are in all CGUs"),
14041404
tls_model: Option<String> = (None, parse_opt_string, [TRACKED],
1405-
"choose the TLS model to use (rustc --print tls-models for details)"),
1405+
"choose the TLS model to use (`rustc --print tls-models` for details)"),
14061406
saturating_float_casts: bool = (false, parse_bool, [TRACKED],
14071407
"make float->int casts UB-free: numbers outside the integer type's range are clipped to \
14081408
the max/min integer respectively, and NaN is mapped to 0"),

src/librustc/traits/error_reporting.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1656,7 +1656,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
16561656
ObligationCauseCode::TrivialBound => {
16571657
err.help("see issue #48214");
16581658
if tcx.sess.opts.unstable_features.is_nightly_build() {
1659-
err.help("add #![feature(trivial_bounds)] to the \
1659+
err.help("add `#![feature(trivial_bounds)]` to the \
16601660
crate attributes to enable",
16611661
);
16621662
}

src/librustc_data_structures/flock.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,14 @@ cfg_if! {
238238
.write(true);
239239
}
240240

241-
debug!("Attempting to open lock file `{}`", p.display());
241+
debug!("attempting to open lock file `{}`", p.display());
242242
let file = match open_options.open(p) {
243243
Ok(file) => {
244-
debug!("Lock file opened successfully");
244+
debug!("lock file opened successfully");
245245
file
246246
}
247247
Err(err) => {
248-
debug!("Error opening lock file: {}", err);
248+
debug!("error opening lock file: {}", err);
249249
return Err(err)
250250
}
251251
};
@@ -262,7 +262,7 @@ cfg_if! {
262262
dwFlags |= LOCKFILE_EXCLUSIVE_LOCK;
263263
}
264264

265-
debug!("Attempting to acquire lock on lock file `{}`",
265+
debug!("attempting to acquire lock on lock file `{}`",
266266
p.display());
267267
LockFileEx(file.as_raw_handle(),
268268
dwFlags,
@@ -273,10 +273,10 @@ cfg_if! {
273273
};
274274
if ret == 0 {
275275
let err = io::Error::last_os_error();
276-
debug!("Failed acquiring file lock: {}", err);
276+
debug!("failed acquiring file lock: {}", err);
277277
Err(err)
278278
} else {
279-
debug!("Successfully acquired lock.");
279+
debug!("successfully acquired lock");
280280
Ok(Lock { _file: file })
281281
}
282282
}

0 commit comments

Comments
 (0)