aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty')
-rw-r--r--crates/hir_ty/src/tests/simple.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/crates/hir_ty/src/tests/simple.rs b/crates/hir_ty/src/tests/simple.rs
index 20ceb7415..12ec4657b 100644
--- a/crates/hir_ty/src/tests/simple.rs
+++ b/crates/hir_ty/src/tests/simple.rs
@@ -2462,3 +2462,32 @@ fn infer_nested_inner_type() {
2462 "#]], 2462 "#]],
2463 ); 2463 );
2464} 2464}
2465
2466#[test]
2467fn inner_use_enum_rename() {
2468 check_infer(
2469 r#"
2470 enum Request {
2471 Info
2472 }
2473
2474 fn f() {
2475 use Request as R;
2476
2477 let r = R::Info;
2478 match r {
2479 R::Info => {}
2480 }
2481 }
2482 "#,
2483 expect![[r#"
2484 34..123 '{ ... } }': ()
2485 67..68 'r': Request
2486 71..78 'R::Info': Request
2487 84..121 'match ... }': ()
2488 90..91 'r': Request
2489 102..109 'R::Info': Request
2490 113..115 '{}': ()
2491 "#]],
2492 )
2493}