summaryrefslogtreecommitdiffstats
path: root/tests/ui/as-precedence.rs
blob: feb0cb30ccaccf49f057db73e9f492e52e538db7 (plain)
1
2
3
4
5
6
7
8
9
10
// run-pass

#[allow(unused_parens)]
fn main() {
    assert_eq!(3 as usize * 3, 9);
    assert_eq!(3 as (usize) * 3, 9);
    assert_eq!(3 as (usize) / 3, 1);
    assert_eq!(3 as usize + 3, 6);
    assert_eq!(3 as (usize) + 3, 6);
}