mozilla/rust — Issue #1659: Can't use left shift on constants
Author: brson
Created: 2012-01-25 10:50:03+00:00
State: open
Labels: bug, easy

```
enum LLVMAttribute {
LLVMExtAttribute = 1<<0
}
```

```
error: internal compiler error unexpected failure
note: The compiler hit an unexpected failure path. This is a bug. Try running with RUST_LOG=rustc=0,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
brian@axis:~/dev/rust-llvm$ PATH=$PATH:~/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin rustc llvm.rc --test
brian@axis:~/dev/rust-llvm$ RUST_LOG=rustc=0,::rt::backtrace PATH=$PATH:~/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin rustc llvm.rc --test
rust: upcall fail 'non-exhaustive match failure', ../src/comp/syntax/ast_util.rs:263
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(_ZN9rust_task4failEv+0x78)[0x7fa4555da4ea]
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(upcall_s_fail+0xe5)[0x7fa4555dffd2]
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(+0x76fd1)[0x7fa45560bfd1]
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(_ZN7context20call_shim_on_c_stackEPvS0_+0x2f)[0x7fa4555dbcaf]
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(_Z22call_upcall_on_c_stackPvS_+0x4b)[0x7fa4555e15cc]
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustrt.so(upcall_fail+0x42)[0x7fa4555e0016]
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6syntax8ast_util15eval_const_expr17_50f77d1e5e3cdfe0E+0xba2)[0x7fa455b30a32]
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle6typeck18check_tag_variants17_f2f8585171cf45a5E+0x6a0)[0x7fa455a7ff10]
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle6typeck10check_item17_96921d6fcc90b518E+0x289)[0x7fa455a832f9]
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-4171d83aef249987-0.1.so(+0x4d427e)[0x7fa455d2627e]
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6syntax5visit17mk_simple_visitor6v_item17_e0294ec538c37498E+0x56)[0x7fa455b48066]
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-4171d83aef249987-0.1.so(+0x512663)[0x7fa455d64663]
/home/brian/dev/rust/build/x86_64-unknown-linux-gnu/stage1/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6syntax5visit9visit_mod17_7ea3d96fba9888e
```