Skip to content

Commit

Permalink
Use a semicolon instead of a dash in lint note
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 committed Nov 8, 2020
1 parent e4e9bb4 commit bd3f3fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
}
Expand Down
8 changes: 4 additions & 4 deletions src/test/ui/lint/lint-const-item-mutation.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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
|
Expand All @@ -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
|
Expand All @@ -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
|
Expand Down Expand Up @@ -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
|
Expand Down

0 comments on commit bd3f3fa

Please sign in to comment.