Use a semicolon instead of a dash in lint note
This commit is contained in:
parent
e4e9bb4a24
commit
bd3f3fa32a
2 changed files with 5 additions and 5 deletions
|
@ -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) {
|
if let Some(def_id) = self.is_const_item_without_destructor(lhs.local) {
|
||||||
self.lint_const_item_usage(&lhs, def_id, loc, |lint| {
|
self.lint_const_item_usage(&lhs, def_id, loc, |lint| {
|
||||||
let mut lint = lint.build("attempting to modify a `const` item");
|
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
|
lint
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ LL | ARRAY[0] = 5;
|
||||||
| ^^^^^^^^^^^^
|
| ^^^^^^^^^^^^
|
||||||
|
|
|
|
||||||
= note: `#[warn(const_item_mutation)]` on by default
|
= 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
|
note: `const` item defined here
|
||||||
--> $DIR/lint-const-item-mutation.rs:26:1
|
--> $DIR/lint-const-item-mutation.rs:26:1
|
||||||
|
|
|
|
||||||
|
@ -18,7 +18,7 @@ warning: attempting to modify a `const` item
|
||||||
LL | MY_STRUCT.field = false;
|
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
|
note: `const` item defined here
|
||||||
--> $DIR/lint-const-item-mutation.rs:27:1
|
--> $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';
|
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
|
note: `const` item defined here
|
||||||
--> $DIR/lint-const-item-mutation.rs:27:1
|
--> $DIR/lint-const-item-mutation.rs:27:1
|
||||||
|
|
|
|
||||||
|
@ -91,7 +91,7 @@ warning: attempting to modify a `const` item
|
||||||
LL | MUTABLE2.msg = "wow";
|
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
|
note: `const` item defined here
|
||||||
--> $DIR/lint-const-item-mutation.rs:30:1
|
--> $DIR/lint-const-item-mutation.rs:30:1
|
||||||
|
|
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue