Skip to content

Commit 7ef02dc

Browse files
authored
Rollup merge of rust-lang#62436 - fakenine:normalize_use_of_backticks_compiler_messages_1, r=Centril
normalize use of backticks/lowercase in compiler messages for librustc_mir normalize use of backticks/lowercase in compiler messages for librustc_mir rust-lang#60532 r? @alexreg
2 parents 30e4a87 + 7a2a17a commit 7ef02dc

36 files changed

+133
-133
lines changed

src/librustc_mir/build/matches/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1465,7 +1465,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
14651465
.map(|b| GuardFrameLocal::new(b.var_id, b.binding_mode))
14661466
.collect(),
14671467
};
1468-
debug!("Entering guard building context: {:?}", guard_frame);
1468+
debug!("entering guard building context: {:?}", guard_frame);
14691469
self.guard_context.push(guard_frame);
14701470

14711471
let re_erased = tcx.lifetimes.re_erased;

src/librustc_mir/hair/pattern/check_match.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ fn check_legality_of_move_bindings(
577577
"cannot bind by-move into a pattern guard");
578578
err.span_label(p.span, "moves value into pattern guard");
579579
if cx.tcx.sess.opts.unstable_features.is_nightly_build() {
580-
err.help("add #![feature(bind_by_move_pattern_guards)] to the \
580+
err.help("add `#![feature(bind_by_move_pattern_guards)]` to the \
581581
crate attributes to enable");
582582
}
583583
err.emit();
@@ -664,7 +664,7 @@ impl<'a, 'tcx> Delegate<'tcx> for MutationChecker<'a, 'tcx> {
664664
"cannot mutably borrow in a pattern guard");
665665
err.span_label(span, "borrowed mutably in pattern guard");
666666
if self.cx.tcx.sess.opts.unstable_features.is_nightly_build() {
667-
err.help("add #![feature(bind_by_move_pattern_guards)] to the \
667+
err.help("add `#![feature(bind_by_move_pattern_guards)]` to the \
668668
crate attributes to enable");
669669
}
670670
err.emit();

src/librustc_mir/interpret/place.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ where
351351
if field >= len {
352352
// This can be violated because this runs during promotion on code where the
353353
// type system has not yet ensured that such things don't happen.
354-
debug!("Tried to access element {} of array/slice with length {}", field, len);
354+
debug!("tried to access element {} of array/slice with length {}", field, len);
355355
return err!(BoundsCheck { len, index: field });
356356
}
357357
stride * field

src/librustc_mir/monomorphize/collector.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ pub fn collect_crate_mono_items(
289289
collect_roots(tcx, mode)
290290
});
291291

292-
debug!("Building mono item graph, beginning at roots");
292+
debug!("building mono item graph, beginning at roots");
293293

294294
let mut visited = MTLock::new(FxHashSet::default());
295295
let mut inlining_map = MTLock::new(InliningMap::new());
@@ -316,7 +316,7 @@ pub fn collect_crate_mono_items(
316316
// Find all non-generic items by walking the HIR. These items serve as roots to
317317
// start monomorphizing from.
318318
fn collect_roots(tcx: TyCtxt<'_>, mode: MonoItemCollectionMode) -> Vec<MonoItem<'_>> {
319-
debug!("Collecting roots");
319+
debug!("collecting roots");
320320
let mut roots = Vec::new();
321321

322322
{

src/librustc_mir/transform/check_unsafety.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -552,10 +552,10 @@ fn unsafe_derive_on_repr_packed(tcx: TyCtxt<'_>, def_id: DefId) {
552552
// FIXME: when we make this a hard error, this should have its
553553
// own error code.
554554
let message = if tcx.generics_of(def_id).own_requires_monomorphization() {
555-
"#[derive] can't be used on a #[repr(packed)] struct with \
555+
"`#[derive]` can't be used on a `#[repr(packed)]` struct with \
556556
type or const parameters (error E0133)".to_string()
557557
} else {
558-
"#[derive] can't be used on a #[repr(packed)] struct that \
558+
"`#[derive]` can't be used on a `#[repr(packed)]` struct that \
559559
does not derive Copy (error E0133)".to_string()
560560
};
561561
tcx.lint_hir(SAFE_PACKED_BORROWS,

src/librustc_mir/transform/copy_prop.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl MirPass for CopyPropagation {
4747

4848
let mut changed = false;
4949
for dest_local in body.local_decls.indices() {
50-
debug!("Considering destination local: {:?}", dest_local);
50+
debug!("considering destination local: {:?}", dest_local);
5151

5252
let action;
5353
let location;
@@ -159,7 +159,7 @@ fn eliminate_self_assignments(
159159
} else {
160160
continue;
161161
}
162-
debug!("Deleting a self-assignment for {:?}", dest_local);
162+
debug!("deleting a self-assignment for {:?}", dest_local);
163163
body.make_statement_nop(location);
164164
changed = true;
165165
}

src/librustc_mir/transform/inline.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ impl Inliner<'tcx> {
159159

160160
// Simplify if we inlined anything.
161161
if changed {
162-
debug!("Running simplify cfg on {:?}", self.source);
162+
debug!("running simplify cfg on {:?}", self.source);
163163
CfgSimplifier::new(caller_body).simplify();
164164
remove_dead_blocks(caller_body);
165165
}
@@ -247,7 +247,7 @@ impl Inliner<'tcx> {
247247
// need to check for first.
248248
attr::InlineAttr::Always => true,
249249
attr::InlineAttr::Never => {
250-
debug!("#[inline(never)] present - not inlining");
250+
debug!("`#[inline(never)]` present - not inlining");
251251
return false
252252
}
253253
attr::InlineAttr::Hint => true,
@@ -397,7 +397,7 @@ impl Inliner<'tcx> {
397397
match terminator.kind {
398398
// FIXME: Handle inlining of diverging calls
399399
TerminatorKind::Call { args, destination: Some(destination), cleanup, .. } => {
400-
debug!("Inlined {:?} into {:?}", callsite.callee, self.source);
400+
debug!("inlined {:?} into {:?}", callsite.callee, self.source);
401401

402402
let mut local_map = IndexVec::with_capacity(callee_body.local_decls.len());
403403
let mut scope_map = IndexVec::with_capacity(callee_body.source_scopes.len());
@@ -456,7 +456,7 @@ impl Inliner<'tcx> {
456456
}
457457

458458
let dest = if dest_needs_borrow(&destination.0) {
459-
debug!("Creating temp for return destination");
459+
debug!("creating temp for return destination");
460460
let dest = Rvalue::Ref(
461461
self.tcx.lifetimes.re_erased,
462462
BorrowKind::Mut { allow_two_phase_borrow: false },
@@ -610,7 +610,7 @@ impl Inliner<'tcx> {
610610
}
611611
}
612612

613-
debug!("Creating temp for argument {:?}", arg);
613+
debug!("creating temp for argument {:?}", arg);
614614
// Otherwise, create a temporary for the arg
615615
let arg = Rvalue::Use(arg);
616616

@@ -659,7 +659,7 @@ struct Integrator<'a, 'tcx> {
659659
impl<'a, 'tcx> Integrator<'a, 'tcx> {
660660
fn update_target(&self, tgt: BasicBlock) -> BasicBlock {
661661
let new = BasicBlock::new(tgt.index() + self.block_idx);
662-
debug!("Updating target `{:?}`, new: `{:?}`", tgt, new);
662+
debug!("updating target `{:?}`, new: `{:?}`", tgt, new);
663663
new
664664
}
665665
}

src/librustc_mir/transform/instcombine.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub struct InstCombineVisitor<'tcx> {
3939
impl<'tcx> MutVisitor<'tcx> for InstCombineVisitor<'tcx> {
4040
fn visit_rvalue(&mut self, rvalue: &mut Rvalue<'tcx>, location: Location) {
4141
if self.optimizations.and_stars.remove(&location) {
42-
debug!("Replacing `&*`: {:?}", rvalue);
42+
debug!("replacing `&*`: {:?}", rvalue);
4343
let new_place = match *rvalue {
4444
Rvalue::Ref(_, _, Place::Projection(ref mut projection)) => {
4545
// Replace with dummy
@@ -51,7 +51,7 @@ impl<'tcx> MutVisitor<'tcx> for InstCombineVisitor<'tcx> {
5151
}
5252

5353
if let Some(constant) = self.optimizations.arrays_lengths.remove(&location) {
54-
debug!("Replacing `Len([_; N])`: {:?}", rvalue);
54+
debug!("replacing `Len([_; N])`: {:?}", rvalue);
5555
*rvalue = Rvalue::Use(Operand::Constant(box constant));
5656
}
5757

src/librustc_mir/transform/qualify_consts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,7 @@ impl MirPass for QualifyAndPromoteConstants {
15451545
diag.note("for more information, see issue \
15461546
https://github.com/rust-lang/rust/issues/57563");
15471547
diag.help(
1548-
"add #![feature(const_fn)] to the crate attributes to enable",
1548+
"add `#![feature(const_fn)]` to the crate attributes to enable",
15491549
);
15501550
diag.emit();
15511551
} else {

src/test/ui/bind-by-move/bind-by-move-no-guards.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0008]: cannot bind by-move into a pattern guard
44
LL | Some(z) if z.recv().unwrap() => { panic!() },
55
| ^ moves value into pattern guard
66
|
7-
= help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable
7+
= help: add `#![feature(bind_by_move_pattern_guards)]` to the crate attributes to enable
88

99
error: aborting due to previous error
1010

src/test/ui/borrowck/borrowck-mutate-in-guard.nll.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ error[E0301]: cannot mutably borrow in a pattern guard
1010
LL | Enum::A(_) if { let y = &mut x; *y = Enum::B(false); false } => 1,
1111
| ^ borrowed mutably in pattern guard
1212
|
13-
= help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable
13+
= help: add `#![feature(bind_by_move_pattern_guards)]` to the crate attributes to enable
1414

1515
error[E0302]: cannot assign in a pattern guard
1616
--> $DIR/borrowck-mutate-in-guard.rs:15:41

src/test/ui/borrowck/borrowck-mutate-in-guard.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ error[E0301]: cannot mutably borrow in a pattern guard
1010
LL | Enum::A(_) if { let y = &mut x; *y = Enum::B(false); false } => 1,
1111
| ^ borrowed mutably in pattern guard
1212
|
13-
= help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable
13+
= help: add `#![feature(bind_by_move_pattern_guards)]` to the crate attributes to enable
1414

1515
error[E0302]: cannot assign in a pattern guard
1616
--> $DIR/borrowck-mutate-in-guard.rs:15:41

src/test/ui/consts/const_let_refutable.nll.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LL | a + b
1111
| ^^^^^
1212
|
1313
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
14-
= help: add #![feature(const_fn)] to the crate attributes to enable
14+
= help: add `#![feature(const_fn)]` to the crate attributes to enable
1515

1616
error[E0381]: use of possibly uninitialized variable: `a`
1717
--> $DIR/const_let_refutable.rs:4:5

src/test/ui/consts/const_let_refutable.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ LL | a + b
1111
| ^^^^^
1212
|
1313
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
14-
= help: add #![feature(const_fn)] to the crate attributes to enable
14+
= help: add `#![feature(const_fn)]` to the crate attributes to enable
1515

1616
warning[E0381]: use of possibly uninitialized variable: `a`
1717
--> $DIR/const_let_refutable.rs:4:5

src/test/ui/consts/min_const_fn/allow_const_fn_ptr.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | const fn error(_: fn()) {}
55
| ^
66
|
77
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
8-
= help: add #![feature(const_fn)] to the crate attributes to enable
8+
= help: add `#![feature(const_fn)]` to the crate attributes to enable
99

1010
error: aborting due to previous error
1111

src/test/ui/consts/min_const_fn/bad_const_fn_body_ice.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | vec![1, 2, 3]
55
| ^^^^^^^^^^^^^
66
|
77
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
8-
= help: add #![feature(const_fn)] to the crate attributes to enable
8+
= help: add `#![feature(const_fn)]` to the crate attributes to enable
99
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
1010

1111
error: aborting due to previous error

src/test/ui/consts/min_const_fn/cast_errors.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | const fn unsize(x: &[u8; 3]) -> &[u8] { x }
55
| ^
66
|
77
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
8-
= help: add #![feature(const_fn)] to the crate attributes to enable
8+
= help: add `#![feature(const_fn)]` to the crate attributes to enable
99

1010
error[E0723]: function pointers in const fn are unstable
1111
--> $DIR/cast_errors.rs:5:23
@@ -14,7 +14,7 @@ LL | const fn closure() -> fn() { || {} }
1414
| ^^^^
1515
|
1616
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
17-
= help: add #![feature(const_fn)] to the crate attributes to enable
17+
= help: add `#![feature(const_fn)]` to the crate attributes to enable
1818

1919
error[E0723]: function pointers in const fn are unstable
2020
--> $DIR/cast_errors.rs:8:5
@@ -23,7 +23,7 @@ LL | (|| {}) as fn();
2323
| ^^^^^^^^^^^^^^^
2424
|
2525
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
26-
= help: add #![feature(const_fn)] to the crate attributes to enable
26+
= help: add `#![feature(const_fn)]` to the crate attributes to enable
2727

2828
error[E0723]: function pointers in const fn are unstable
2929
--> $DIR/cast_errors.rs:11:28
@@ -32,7 +32,7 @@ LL | const fn reify(f: fn()) -> unsafe fn() { f }
3232
| ^^^^^^^^^^^
3333
|
3434
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
35-
= help: add #![feature(const_fn)] to the crate attributes to enable
35+
= help: add `#![feature(const_fn)]` to the crate attributes to enable
3636

3737
error[E0723]: function pointers in const fn are unstable
3838
--> $DIR/cast_errors.rs:13:21
@@ -41,7 +41,7 @@ LL | const fn reify2() { main as unsafe fn(); }
4141
| ^^^^^^^^^^^^^^^^^^^
4242
|
4343
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
44-
= help: add #![feature(const_fn)] to the crate attributes to enable
44+
= help: add `#![feature(const_fn)]` to the crate attributes to enable
4545

4646
error: aborting due to 5 previous errors
4747

src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | const fn cmp(x: fn(), y: fn()) -> bool {
55
| ^
66
|
77
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
8-
= help: add #![feature(const_fn)] to the crate attributes to enable
8+
= help: add `#![feature(const_fn)]` to the crate attributes to enable
99

1010
error: aborting due to previous error
1111

src/test/ui/consts/min_const_fn/loop_ice.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | loop {}
55
| ^^^^^^^
66
|
77
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
8-
= help: add #![feature(const_fn)] to the crate attributes to enable
8+
= help: add `#![feature(const_fn)]` to the crate attributes to enable
99

1010
error: aborting due to previous error
1111

0 commit comments

Comments
 (0)