Skip to content

Commit bd3f3fa

Browse files
committed
Use a semicolon instead of a dash in lint note
1 parent e4e9bb4 commit bd3f3fa

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

compiler/rustc_mir/src/transform/check_const_item_mutation.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl<'a, 'tcx> Visitor<'tcx> for ConstMutationChecker<'a, 'tcx> {
103103
if let Some(def_id) = self.is_const_item_without_destructor(lhs.local) {
104104
self.lint_const_item_usage(&lhs, def_id, loc, |lint| {
105105
let mut lint = lint.build("attempting to modify a `const` item");
106-
lint.note("each usage of a `const` item creates a new temporary - the original `const` item will not be modified");
106+
lint.note("each usage of a `const` item creates a new temporary; the original `const` item will not be modified");
107107
lint
108108
})
109109
}

src/test/ui/lint/lint-const-item-mutation.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | ARRAY[0] = 5;
55
| ^^^^^^^^^^^^
66
|
77
= note: `#[warn(const_item_mutation)]` on by default
8-
= note: each usage of a `const` item creates a new temporary - the original `const` item will not be modified
8+
= note: each usage of a `const` item creates a new temporary; the original `const` item will not be modified
99
note: `const` item defined here
1010
--> $DIR/lint-const-item-mutation.rs:26:1
1111
|
@@ -18,7 +18,7 @@ warning: attempting to modify a `const` item
1818
LL | MY_STRUCT.field = false;
1919
| ^^^^^^^^^^^^^^^^^^^^^^^
2020
|
21-
= note: each usage of a `const` item creates a new temporary - the original `const` item will not be modified
21+
= note: each usage of a `const` item creates a new temporary; the original `const` item will not be modified
2222
note: `const` item defined here
2323
--> $DIR/lint-const-item-mutation.rs:27:1
2424
|
@@ -31,7 +31,7 @@ warning: attempting to modify a `const` item
3131
LL | MY_STRUCT.inner_array[0] = 'b';
3232
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3333
|
34-
= note: each usage of a `const` item creates a new temporary - the original `const` item will not be modified
34+
= note: each usage of a `const` item creates a new temporary; the original `const` item will not be modified
3535
note: `const` item defined here
3636
--> $DIR/lint-const-item-mutation.rs:27:1
3737
|
@@ -91,7 +91,7 @@ warning: attempting to modify a `const` item
9191
LL | MUTABLE2.msg = "wow";
9292
| ^^^^^^^^^^^^^^^^^^^^
9393
|
94-
= note: each usage of a `const` item creates a new temporary - the original `const` item will not be modified
94+
= note: each usage of a `const` item creates a new temporary; the original `const` item will not be modified
9595
note: `const` item defined here
9696
--> $DIR/lint-const-item-mutation.rs:30:1
9797
|

0 commit comments

Comments
 (0)