mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
parent
612e6843f1
commit
925c51aef3
1 changed files with 29 additions and 0 deletions
|
@ -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 '{}': ()
|
||||||
|
"#]],
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue