Added test
This commit is contained in:
parent
ddb46aaf88
commit
0276068255
2 changed files with 17 additions and 1 deletions
2
src/llvm
2
src/llvm
|
|
@ -1 +1 @@
|
|||
Subproject commit 874dc4ee4cb782056469f003831bcda3e4cdf0df
|
||||
Subproject commit 168f91ce5cbf8933e47f339911f0f46a48714852
|
||||
16
src/test/compile-fail/non-constant-in-const-path.rs
Normal file
16
src/test/compile-fail/non-constant-in-const-path.rs
Normal file
|
|
@ -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
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue