From a257d5afb037b45581657fe343d5df5a100f8d70 Mon Sep 17 00:00:00 2001 From: acdenisSK Date: Sat, 6 May 2017 16:06:38 +0200 Subject: [PATCH 1/2] Fix "an" usage --- .travis.yml | 2 +- src/libsyntax/parse/parser.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index beb7b435cba..4fcf6f02def 100644 --- a/.travis.yml +++ b/.travis.yml @@ -194,7 +194,7 @@ after_failure: # Save tagged docker images we created and load them if they're available # Travis saves caches whether the build failed or not, nuke rustsrc if -# the failure was while updating it (as it may be in an bad state) +# the failure was while updating it (as it may be in a bad state) # https://github.com/travis-ci/travis-ci/issues/4472 before_cache: - docker history -q rust-ci | diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index f99f39dae6b..268b3d08a80 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -2707,7 +2707,7 @@ impl<'a> Parser<'a> { let (span, e) = self.interpolated_or_expr_span(e)?; let span_of_tilde = lo; let mut err = self.diagnostic().struct_span_err(span_of_tilde, - "`~` can not be used as an unary operator"); + "`~` can not be used as a unary operator"); err.span_label(span_of_tilde, &"did you mean `!`?"); err.help("use `!` instead of `~` if you meant to perform bitwise negation"); err.emit(); From bb34a3e16bd5bff5187d554bfc6c03314a353e17 Mon Sep 17 00:00:00 2001 From: acdenisSK Date: Sat, 6 May 2017 18:49:01 +0200 Subject: [PATCH 2/2] Update the .stderr file for the "an" changes --- src/test/ui/did_you_mean/issue-41679.stderr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/ui/did_you_mean/issue-41679.stderr b/src/test/ui/did_you_mean/issue-41679.stderr index 5a89ec96e24..2abbbf65ba9 100644 --- a/src/test/ui/did_you_mean/issue-41679.stderr +++ b/src/test/ui/did_you_mean/issue-41679.stderr @@ -1,4 +1,4 @@ -error: `~` can not be used as an unary operator +error: `~` can not be used as a unary operator --> $DIR/issue-41679.rs:12:13 | 12 | let x = ~1;