about summary refs log tree commit diff
path: root/src/libsyntax/parse/parser
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2019-10-18 13:48:38 -0700
committerGitHub <noreply@github.com>2019-10-18 13:48:38 -0700
commit3850408b9b85d27e98915e57cefbd659e909b37a (patch)
tree6d41ada9496e26f1b05a07658d62d0773663282e /src/libsyntax/parse/parser
parentedc42a91fdcbf9fb01b74aa78c5bfdfc859d4574 (diff)
parent9617014aa6c1d95bf4f59fc333b10f6b33dbe1ee (diff)
downloadrust-3850408b9b85d27e98915e57cefbd659e909b37a.tar.gz
rust-3850408b9b85d27e98915e57cefbd659e909b37a.zip
Rollup merge of #65552 - JohnTitor:use-bitwise-not, r=Dylan-DPC
Clarify diagnostics when using `~` as a unary op

It seems we prefer `bitwise not` to `bitwise negation`.
Fixes #57239

r? @estebank
Diffstat (limited to 'src/libsyntax/parse/parser')
-rw-r--r--src/libsyntax/parse/parser/expr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax/parse/parser/expr.rs b/src/libsyntax/parse/parser/expr.rs
index 273f5a5ffa3..67a530ec683 100644
--- a/src/libsyntax/parse/parser/expr.rs
+++ b/src/libsyntax/parse/parser/expr.rs
@@ -423,7 +423,7 @@ impl<'a> Parser<'a> {
                 self.struct_span_err(span_of_tilde, "`~` cannot be used as a unary operator")
                     .span_suggestion_short(
                         span_of_tilde,
-                        "use `!` to perform bitwise negation",
+                        "use `!` to perform bitwise not",
                         "!".to_owned(),
                         Applicability::MachineApplicable
                     )