diff options
Diffstat (limited to 'crates/ra_hir_ty/src/tests/simple.rs')
-rw-r--r-- | crates/ra_hir_ty/src/tests/simple.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/crates/ra_hir_ty/src/tests/simple.rs b/crates/ra_hir_ty/src/tests/simple.rs index f7e042c12..b7204ec00 100644 --- a/crates/ra_hir_ty/src/tests/simple.rs +++ b/crates/ra_hir_ty/src/tests/simple.rs | |||
@@ -614,6 +614,27 @@ fn test() -> bool { | |||
614 | } | 614 | } |
615 | 615 | ||
616 | #[test] | 616 | #[test] |
617 | fn infer_shift_op() { | ||
618 | assert_snapshot!( | ||
619 | infer(r#" | ||
620 | fn test() { | ||
621 | 1u32 << 5u8; | ||
622 | 1u32 >> 5u8; | ||
623 | } | ||
624 | "#), | ||
625 | @r###" | ||
626 | [11; 48) '{ ...5u8; }': () | ||
627 | [17; 21) '1u32': u32 | ||
628 | [17; 28) '1u32 << 5u8': u32 | ||
629 | [25; 28) '5u8': u8 | ||
630 | [34; 38) '1u32': u32 | ||
631 | [34; 45) '1u32 >> 5u8': u32 | ||
632 | [42; 45) '5u8': u8 | ||
633 | "### | ||
634 | ); | ||
635 | } | ||
636 | |||
637 | #[test] | ||
617 | fn infer_field_autoderef() { | 638 | fn infer_field_autoderef() { |
618 | assert_snapshot!( | 639 | assert_snapshot!( |
619 | infer(r#" | 640 | infer(r#" |