Use a semicolon instead of a dash in lint note

This commit is contained in:
Aaron Hill 2020-11-07 20:39:35 -05:00
parent e4e9bb4a24
commit bd3f3fa32a
No known key found for this signature in database
GPG Key ID: B4087E510E98B164
2 changed files with 5 additions and 5 deletions

View File

@ -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
})
}

View File

@ -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
|