This commit is contained in:
Kartavya Vashishtha 2022-08-25 13:11:14 +05:30
parent e3dc5a588f
commit 71c15f2a44
No known key found for this signature in database
GPG Key ID: A50012C2324E5DF0

View File

@ -357,4 +357,27 @@ impl<'outer, Outer, const OUTER: usize> () {
"#,
);
}
#[test]
fn issue_11197 () {
check_assist(extract_type_alias,
r#"
struct Foo<T, const N: usize>
where
[T; N]: Sized,
{
arr: $0[T; N]$0,
}
"#,
r#"
type $0Type<T, const N: usize> = [T; N];
struct Foo<T, const N: usize>
where
[T; N]: Sized,
{
arr: Type<T, N>,
}
"#);
}
}