diff options
| author | christopherdumas <christopherdumas@me.com> | 2015-09-10 20:44:03 -0700 |
|---|---|---|
| committer | christopherdumas <christopherdumas@me.com> | 2015-09-10 20:44:03 -0700 |
| commit | 0276068255257e17fbb203eb36aee533b60c4cab (patch) | |
| tree | 8be1729bcae7bed930285f55608ca08956be5369 | |
| parent | ddb46aaf88148f9b525eef43794f02f5247c0461 (diff) | |
| download | rust-0276068255257e17fbb203eb36aee533b60c4cab.tar.gz rust-0276068255257e17fbb203eb36aee533b60c4cab.zip | |
Added test
| m--------- | src/llvm | 0 | ||||
| -rw-r--r-- | src/test/compile-fail/non-constant-in-const-path.rs | 16 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/llvm b/src/llvm -Subproject 874dc4ee4cb782056469f003831bcda3e4cdf0d +Subproject 168f91ce5cbf8933e47f339911f0f46a4871485 diff --git a/src/test/compile-fail/non-constant-in-const-path.rs b/src/test/compile-fail/non-constant-in-const-path.rs new file mode 100644 index 00000000000..00572237c0e --- /dev/null +++ b/src/test/compile-fail/non-constant-in-const-path.rs @@ -0,0 +1,16 @@ +// Copyright 2015 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. + +fn main() { + let x = 0; + match 1 { + 0 ... x => {} //~ ERROR non-constant path in constant expr + }; +} |
