rustc: Allow any integral types on rhs of shift ops
This commit is contained in:
parent
e9c7f0c2ba
commit
99a48660d1
4 changed files with 156 additions and 8 deletions
|
@ -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 "@"; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue