]>
git.proxmox.com Git - rustc.git/blob - src/test/run-pass/match-static-const-rename.rs
08f3182900fc2bba9fdd135c319b34c4e8e1c0c7
1 // Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // Issue #7526: lowercase static constants in patterns look like bindings
13 // This is similar to compile-fail/match-static-const-lc, except it
14 // shows the expected usual workaround (choosing a different name for
15 // the static definition) and also demonstrates that one can work
16 // around this problem locally by renaming the constant in the `use`
17 // form to an uppercase identifier that placates the lint.
20 #![deny(non_upper_case_globals)]
22 pub const A
: isize = 97;
30 let r
= match (0,97) {
38 #[allow(non_upper_case_globals)]
39 pub const aha
: isize = 7;
43 use self::m
::aha
as AHA
;
58 (0, self::m
::aha
) => 0,
63 (0, self::m
::aha
) => 0,