mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Add cycle recovery for type aliases
This commit is contained in:
parent
3ca40f7c08
commit
1c622e9fed
3 changed files with 10 additions and 2 deletions
|
@ -2154,7 +2154,6 @@ fn test(x: Foo, y: Bar<&str>, z: Baz<i8, u8>) {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic] // we currently can't handle this
|
||||
fn recursive_type_alias() {
|
||||
assert_snapshot!(
|
||||
infer(r#"
|
||||
|
@ -2163,7 +2162,10 @@ type Foo = Foo;
|
|||
type Bar = A<Bar>;
|
||||
fn test(x: Foo) {}
|
||||
"#),
|
||||
@""
|
||||
@r###"
|
||||
[59; 60) 'x': {unknown}
|
||||
[67; 69) '{}': ()
|
||||
"###
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue