about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAaron Hill <aa1ronham@gmail.com>2020-11-07 20:39:35 -0500
committerAaron Hill <aa1ronham@gmail.com>2020-11-07 20:39:35 -0500
commitbd3f3fa32a7ffe30b47625edc4c6bf814aed4964 (patch)
tree746dfa8c68da3eefb4b225bcd3ed5bc66d0ed1c8
parente4e9bb4a244464049651c66b408639f60fcdcc58 (diff)
downloadrust-bd3f3fa32a7ffe30b47625edc4c6bf814aed4964.tar.gz
rust-bd3f3fa32a7ffe30b47625edc4c6bf814aed4964.zip
Use a semicolon instead of a dash in lint note
-rw-r--r--compiler/rustc_mir/src/transform/check_const_item_mutation.rs2
-rw-r--r--src/test/ui/lint/lint-const-item-mutation.stderr8
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 74fe589e4a9..a8457043278 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 d9195a2319f..ae95abc72f3 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
    |