1
Fork 0

rustc: Allow any integral types on rhs of shift ops

This commit is contained in:
Brian Anderson 2012-02-21 21:01:33 -08:00
parent e9c7f0c2ba
commit 99a48660d1
4 changed files with 156 additions and 8 deletions

View file

@ -64,6 +64,15 @@ pure fn lazy_binop(b: binop) -> bool {
alt b { and { true } or { true } _ { false } }
}
pure fn is_shift_binop(b: binop) -> bool {
alt b {
lsl { true }
lsr { true }
asr { true }
_ { false }
}
}
fn unop_to_str(op: unop) -> str {
alt op {
box(mt) { if mt == m_mutbl { ret "@mut "; } ret "@"; }