diff options
| author | Ravi Shankar <wafflespeanut@gmail.com> | 2015-11-15 02:37:49 +0530 |
|---|---|---|
| committer | Ravi Shankar <wafflespeanut@gmail.com> | 2015-11-17 12:14:28 +0530 |
| commit | 7f63c7cf4c2938c31de3d63fc769706f0d87cb54 (patch) | |
| tree | 833f8d3fec60094d78028ccd64488c1174fda60f /src/test/parse-fail | |
| parent | 929ca3cb51ccb1c47ac4a330f50d8ae8ded1ba06 (diff) | |
| download | rust-7f63c7cf4c2938c31de3d63fc769706f0d87cb54.tar.gz rust-7f63c7cf4c2938c31de3d63fc769706f0d87cb54.zip | |
Detect confusing unicode characters and show the alternative
Diffstat (limited to 'src/test/parse-fail')
| -rw-r--r-- | src/test/parse-fail/unicode-chars.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/parse-fail/unicode-chars.rs b/src/test/parse-fail/unicode-chars.rs new file mode 100644 index 00000000000..adfaf62b5d3 --- /dev/null +++ b/src/test/parse-fail/unicode-chars.rs @@ -0,0 +1,18 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// compile-flags: -Z parse-only +// ignore-tidy-linelength + +fn main() { + let y = 0; + //~^ ERROR unknown start of token: \u{37e} + //~^^ HELP unicode character ';' (Greek Question Mark) looks much like ';' (Semicolon), but it's not +} |
