diff options
author | TomasKralCZ <[email protected]> | 2020-01-19 16:51:03 +0000 |
---|---|---|
committer | TomasKralCZ <[email protected]> | 2020-01-19 16:51:03 +0000 |
commit | 514df15d9e32e057ba23dda0d4f5c07e82e7ed23 (patch) | |
tree | 41e93f63182bae10a7325fc50220f67df79aaece /crates/ra_hir_ty/src/tests | |
parent | c3b9a19eb72ae9542272ae7a22ac3fb57c75daca (diff) | |
parent | 3a7724e44181ccd5c248589538bd82458b5a9407 (diff) |
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer
Diffstat (limited to 'crates/ra_hir_ty/src/tests')
-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#" |