diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-03-08 14:27:23 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-03-17 22:08:07 +0300 |
| commit | 5d06c890fececc6f6779cd65ca83cef4647b8fdd (patch) | |
| tree | 7ffd581b7c7b9ac7294ecb6f28994b1afe753659 /src/test/parse-fail | |
| parent | 61b6bf54fdf56195baf9a8ee7383551b0d468c81 (diff) | |
| download | rust-5d06c890fececc6f6779cd65ca83cef4647b8fdd.tar.gz rust-5d06c890fececc6f6779cd65ca83cef4647b8fdd.zip | |
syntax: Make `_` an identifier
Diffstat (limited to 'src/test/parse-fail')
| -rw-r--r-- | src/test/parse-fail/issue-32501.rs | 4 | ||||
| -rw-r--r-- | src/test/parse-fail/recover-enum2.rs | 2 | ||||
| -rw-r--r-- | src/test/parse-fail/underscore-suffix-for-float.rs | 3 |
3 files changed, 4 insertions, 5 deletions
diff --git a/src/test/parse-fail/issue-32501.rs b/src/test/parse-fail/issue-32501.rs index f29c1fa2794..21db2f50517 100644 --- a/src/test/parse-fail/issue-32501.rs +++ b/src/test/parse-fail/issue-32501.rs @@ -16,7 +16,5 @@ fn main() { let _ = 0; let mut b = 0; let mut _b = 0; - let mut _ = 0; //~ ERROR expected identifier, found `_` - //~^ NOTE `_` is a wildcard pattern, not an identifier - //~| NOTE expected identifier + let mut _ = 0; //~ ERROR expected identifier, found reserved identifier `_` } diff --git a/src/test/parse-fail/recover-enum2.rs b/src/test/parse-fail/recover-enum2.rs index 49380a03e15..6fd32f842f1 100644 --- a/src/test/parse-fail/recover-enum2.rs +++ b/src/test/parse-fail/recover-enum2.rs @@ -39,5 +39,5 @@ fn main() { } } // still recover later - let bad_syntax = _; //~ ERROR: found `_` + let bad_syntax = _; //~ ERROR: expected expression, found reserved identifier `_` } diff --git a/src/test/parse-fail/underscore-suffix-for-float.rs b/src/test/parse-fail/underscore-suffix-for-float.rs index df7d9aa374d..8327217e6f2 100644 --- a/src/test/parse-fail/underscore-suffix-for-float.rs +++ b/src/test/parse-fail/underscore-suffix-for-float.rs @@ -9,5 +9,6 @@ // except according to those terms. fn main() { - let a = 42._; //~ ERROR unexpected token: `_` + let a = 42._; //~ ERROR expected identifier, found reserved identifier `_` + //~^ ERROR `{integer}` is a primitive type and therefore doesn't have fields } |
