Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
7631: Add test for rust-lang#1165 r=jonas-schievink a=jonas-schievink

Closes rust-lang#1165

bors r+

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
  • Loading branch information
bors[bot] and jonas-schievink authored Feb 10, 2021
2 parents 612e684 + 925c51a commit b0f20a7
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions crates/hir_ty/src/tests/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2462,3 +2462,32 @@ fn infer_nested_inner_type() {
"#]],
);
}

#[test]
fn inner_use_enum_rename() {
check_infer(
r#"
enum Request {
Info
}
fn f() {
use Request as R;
let r = R::Info;
match r {
R::Info => {}
}
}
"#,
expect![[r#"
34..123 '{ ... } }': ()
67..68 'r': Request
71..78 'R::Info': Request
84..121 'match ... }': ()
90..91 'r': Request
102..109 'R::Info': Request
113..115 '{}': ()
"#]],
)
}

0 comments on commit b0f20a7

Please sign in to comment.