diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/as-precedence.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/as-precedence.rs b/src/test/ui/as-precedence.rs new file mode 100644 index 000000000..feb0cb30c --- /dev/null +++ b/src/test/ui/as-precedence.rs @@ -0,0 +1,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); +} |