Skip to content

Commit

Permalink
Rollup merge of rust-lang#62436 - fakenine:normalize_use_of_backticks…
Browse files Browse the repository at this point in the history
…_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
  • Loading branch information
Centril authored Jul 6, 2019
2 parents b731e32 + 79c760a commit edd2cab
Show file tree
Hide file tree
Showing 32 changed files with 96 additions and 96 deletions.
2 changes: 1 addition & 1 deletion src/librustc_mir/build/matches/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
.map(|b| GuardFrameLocal::new(b.var_id, b.binding_mode))
.collect(),
};
debug!("Entering guard building context: {:?}", guard_frame);
debug!("entering guard building context: {:?}", guard_frame);
self.guard_context.push(guard_frame);

let re_erased = tcx.lifetimes.re_erased;
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_mir/hair/pattern/check_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ fn check_legality_of_move_bindings(
"cannot bind by-move into a pattern guard");
err.span_label(p.span, "moves value into pattern guard");
if cx.tcx.sess.opts.unstable_features.is_nightly_build() {
err.help("add #![feature(bind_by_move_pattern_guards)] to the \
err.help("add `#![feature(bind_by_move_pattern_guards)]` to the \
crate attributes to enable");
}
err.emit();
Expand Down Expand Up @@ -664,7 +664,7 @@ impl<'a, 'tcx> Delegate<'tcx> for MutationChecker<'a, 'tcx> {
"cannot mutably borrow in a pattern guard");
err.span_label(span, "borrowed mutably in pattern guard");
if self.cx.tcx.sess.opts.unstable_features.is_nightly_build() {
err.help("add #![feature(bind_by_move_pattern_guards)] to the \
err.help("add `#![feature(bind_by_move_pattern_guards)]` to the \
crate attributes to enable");
}
err.emit();
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/interpret/place.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ where
if field >= len {
// This can be violated because this runs during promotion on code where the
// type system has not yet ensured that such things don't happen.
debug!("Tried to access element {} of array/slice with length {}", field, len);
debug!("tried to access element {} of array/slice with length {}", field, len);
return err!(BoundsCheck { len, index: field });
}
stride * field
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_mir/monomorphize/collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ pub fn collect_crate_mono_items(
collect_roots(tcx, mode)
});

debug!("Building mono item graph, beginning at roots");
debug!("building mono item graph, beginning at roots");

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

{
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_mir/transform/check_unsafety.rs
Original file line number Diff line number Diff line change
Expand Up @@ -552,10 +552,10 @@ fn unsafe_derive_on_repr_packed(tcx: TyCtxt<'_>, def_id: DefId) {
// FIXME: when we make this a hard error, this should have its
// own error code.
let message = if tcx.generics_of(def_id).own_requires_monomorphization() {
"#[derive] can't be used on a #[repr(packed)] struct with \
"`#[derive]` can't be used on a `#[repr(packed)]` struct with \
type or const parameters (error E0133)".to_string()
} else {
"#[derive] can't be used on a #[repr(packed)] struct that \
"`#[derive]` can't be used on a `#[repr(packed)]` struct that \
does not derive Copy (error E0133)".to_string()
};
tcx.lint_hir(SAFE_PACKED_BORROWS,
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_mir/transform/copy_prop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl MirPass for CopyPropagation {

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

let action;
let location;
Expand Down Expand Up @@ -159,7 +159,7 @@ fn eliminate_self_assignments(
} else {
continue;
}
debug!("Deleting a self-assignment for {:?}", dest_local);
debug!("deleting a self-assignment for {:?}", dest_local);
body.make_statement_nop(location);
changed = true;
}
Expand Down
12 changes: 6 additions & 6 deletions src/librustc_mir/transform/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl Inliner<'tcx> {

// Simplify if we inlined anything.
if changed {
debug!("Running simplify cfg on {:?}", self.source);
debug!("running simplify cfg on {:?}", self.source);
CfgSimplifier::new(caller_body).simplify();
remove_dead_blocks(caller_body);
}
Expand Down Expand Up @@ -247,7 +247,7 @@ impl Inliner<'tcx> {
// need to check for first.
attr::InlineAttr::Always => true,
attr::InlineAttr::Never => {
debug!("#[inline(never)] present - not inlining");
debug!("`#[inline(never)]` present - not inlining");
return false
}
attr::InlineAttr::Hint => true,
Expand Down Expand Up @@ -397,7 +397,7 @@ impl Inliner<'tcx> {
match terminator.kind {
// FIXME: Handle inlining of diverging calls
TerminatorKind::Call { args, destination: Some(destination), cleanup, .. } => {
debug!("Inlined {:?} into {:?}", callsite.callee, self.source);
debug!("inlined {:?} into {:?}", callsite.callee, self.source);

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

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

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

Expand Down Expand Up @@ -659,7 +659,7 @@ struct Integrator<'a, 'tcx> {
impl<'a, 'tcx> Integrator<'a, 'tcx> {
fn update_target(&self, tgt: BasicBlock) -> BasicBlock {
let new = BasicBlock::new(tgt.index() + self.block_idx);
debug!("Updating target `{:?}`, new: `{:?}`", tgt, new);
debug!("updating target `{:?}`, new: `{:?}`", tgt, new);
new
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/librustc_mir/transform/instcombine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub struct InstCombineVisitor<'tcx> {
impl<'tcx> MutVisitor<'tcx> for InstCombineVisitor<'tcx> {
fn visit_rvalue(&mut self, rvalue: &mut Rvalue<'tcx>, location: Location) {
if self.optimizations.and_stars.remove(&location) {
debug!("Replacing `&*`: {:?}", rvalue);
debug!("replacing `&*`: {:?}", rvalue);
let new_place = match *rvalue {
Rvalue::Ref(_, _, Place::Projection(ref mut projection)) => {
// Replace with dummy
Expand All @@ -51,7 +51,7 @@ impl<'tcx> MutVisitor<'tcx> for InstCombineVisitor<'tcx> {
}

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

Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/transform/qualify_consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1545,7 +1545,7 @@ impl MirPass for QualifyAndPromoteConstants {
diag.note("for more information, see issue \
https://github.com/rust-lang/rust/issues/57563");
diag.help(
"add #![feature(const_fn)] to the crate attributes to enable",
"add `#![feature(const_fn)]` to the crate attributes to enable",
);
diag.emit();
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/bind-by-move/bind-by-move-no-guards.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ error[E0008]: cannot bind by-move into a pattern guard
LL | Some(z) if z.recv().unwrap() => { panic!() },
| ^ moves value into pattern guard
|
= help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable
= help: add `#![feature(bind_by_move_pattern_guards)]` to the crate attributes to enable

error: aborting due to previous error

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/borrowck-mutate-in-guard.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ error[E0301]: cannot mutably borrow in a pattern guard
LL | Enum::A(_) if { let y = &mut x; *y = Enum::B(false); false } => 1,
| ^ borrowed mutably in pattern guard
|
= help: add #![feature(bind_by_move_pattern_guards)] to the crate attributes to enable
= help: add `#![feature(bind_by_move_pattern_guards)]` to the crate attributes to enable

error[E0302]: cannot assign in a pattern guard
--> $DIR/borrowck-mutate-in-guard.rs:15:41
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/consts/const_let_refutable.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LL | a + b
| ^^^^^
|
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
= help: add #![feature(const_fn)] to the crate attributes to enable
= help: add `#![feature(const_fn)]` to the crate attributes to enable

warning[E0381]: use of possibly uninitialized variable: `a`
--> $DIR/const_let_refutable.rs:4:5
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/consts/min_const_fn/allow_const_fn_ptr.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | const fn error(_: fn()) {}
| ^
|
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
= help: add #![feature(const_fn)] to the crate attributes to enable
= help: add `#![feature(const_fn)]` to the crate attributes to enable

error: aborting due to previous error

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

error: aborting due to previous error
Expand Down
10 changes: 5 additions & 5 deletions src/test/ui/consts/min_const_fn/cast_errors.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | const fn unsize(x: &[u8; 3]) -> &[u8] { x }
| ^
|
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
= help: add #![feature(const_fn)] to the crate attributes to enable
= help: add `#![feature(const_fn)]` to the crate attributes to enable

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

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

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

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

error: aborting due to 5 previous errors

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/consts/min_const_fn/cmp_fn_pointers.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | const fn cmp(x: fn(), y: fn()) -> bool {
| ^
|
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
= help: add #![feature(const_fn)] to the crate attributes to enable
= help: add `#![feature(const_fn)]` to the crate attributes to enable

error: aborting due to previous error

Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/consts/min_const_fn/loop_ice.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ LL | loop {}
| ^^^^^^^
|
= note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
= help: add #![feature(const_fn)] to the crate attributes to enable
= help: add `#![feature(const_fn)]` to the crate attributes to enable

error: aborting due to previous error

Expand Down
Loading

0 comments on commit edd2cab

Please sign in to comment.