From bd3f3fa32a7ffe30b47625edc4c6bf814aed4964 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Sat, 7 Nov 2020 20:39:35 -0500 Subject: [PATCH] Use a semicolon instead of a dash in lint note --- .../rustc_mir/src/transform/check_const_item_mutation.rs | 2 +- src/test/ui/lint/lint-const-item-mutation.stderr | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/compiler/rustc_mir/src/transform/check_const_item_mutation.rs b/compiler/rustc_mir/src/transform/check_const_item_mutation.rs index 74fe589e4a946..a84570432786e 100644 --- a/compiler/rustc_mir/src/transform/check_const_item_mutation.rs +++ b/compiler/rustc_mir/src/transform/check_const_item_mutation.rs @@ -103,7 +103,7 @@ impl<'a, 'tcx> Visitor<'tcx> for ConstMutationChecker<'a, 'tcx> { if let Some(def_id) = self.is_const_item_without_destructor(lhs.local) { self.lint_const_item_usage(&lhs, def_id, loc, |lint| { let mut lint = lint.build("attempting to modify a `const` item"); - lint.note("each usage of a `const` item creates a new temporary - the original `const` item will not be modified"); + lint.note("each usage of a `const` item creates a new temporary; the original `const` item will not be modified"); lint }) } diff --git a/src/test/ui/lint/lint-const-item-mutation.stderr b/src/test/ui/lint/lint-const-item-mutation.stderr index d9195a2319f54..ae95abc72f39a 100644 --- a/src/test/ui/lint/lint-const-item-mutation.stderr +++ b/src/test/ui/lint/lint-const-item-mutation.stderr @@ -5,7 +5,7 @@ LL | ARRAY[0] = 5; | ^^^^^^^^^^^^ | = note: `#[warn(const_item_mutation)]` on by default - = note: each usage of a `const` item creates a new temporary - the original `const` item will not be modified + = note: each usage of a `const` item creates a new temporary; the original `const` item will not be modified note: `const` item defined here --> $DIR/lint-const-item-mutation.rs:26:1 | @@ -18,7 +18,7 @@ warning: attempting to modify a `const` item LL | MY_STRUCT.field = false; | ^^^^^^^^^^^^^^^^^^^^^^^ | - = note: each usage of a `const` item creates a new temporary - the original `const` item will not be modified + = note: each usage of a `const` item creates a new temporary; the original `const` item will not be modified note: `const` item defined here --> $DIR/lint-const-item-mutation.rs:27:1 | @@ -31,7 +31,7 @@ warning: attempting to modify a `const` item LL | MY_STRUCT.inner_array[0] = 'b'; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: each usage of a `const` item creates a new temporary - the original `const` item will not be modified + = note: each usage of a `const` item creates a new temporary; the original `const` item will not be modified note: `const` item defined here --> $DIR/lint-const-item-mutation.rs:27:1 | @@ -91,7 +91,7 @@ warning: attempting to modify a `const` item LL | MUTABLE2.msg = "wow"; | ^^^^^^^^^^^^^^^^^^^^ | - = note: each usage of a `const` item creates a new temporary - the original `const` item will not be modified + = note: each usage of a `const` item creates a new temporary; the original `const` item will not be modified note: `const` item defined here --> $DIR/lint-const-item-mutation.rs:30:1 |