From 0276068255257e17fbb203eb36aee533b60c4cab Mon Sep 17 00:00:00 2001 From: christopherdumas Date: Thu, 10 Sep 2015 20:44:03 -0700 Subject: [PATCH] Added test --- src/llvm | 2 +- .../compile-fail/non-constant-in-const-path.rs | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/test/compile-fail/non-constant-in-const-path.rs diff --git a/src/llvm b/src/llvm index 874dc4ee4cb7..168f91ce5cbf 160000 --- a/src/llvm +++ b/src/llvm @@ -1 +1 @@ -Subproject commit 874dc4ee4cb782056469f003831bcda3e4cdf0df +Subproject commit 168f91ce5cbf8933e47f339911f0f46a48714852 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 000000000000..00572237c0ef --- /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 or the MIT license +// , 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 + }; +}