From 7b535e1096b8a1f0d076d4b6f6aac623adb7d23f Mon Sep 17 00:00:00 2001 From: Masaki Hara Date: Fri, 12 May 2017 22:00:06 +0900 Subject: Disallow ._ in float literal. --- src/test/parse-fail/underscore-suffix-for-float.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/test/parse-fail/underscore-suffix-for-float.rs (limited to 'src/test/parse-fail') diff --git a/src/test/parse-fail/underscore-suffix-for-float.rs b/src/test/parse-fail/underscore-suffix-for-float.rs new file mode 100644 index 00000000000..df7d9aa374d --- /dev/null +++ b/src/test/parse-fail/underscore-suffix-for-float.rs @@ -0,0 +1,13 @@ +// Copyright 2017 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + let a = 42._; //~ ERROR unexpected token: `_` +} -- cgit 1.4.1-3-g733a5