Skip to content

Commit 71c15f2

Browse files
committed
add test
1 parent e3dc5a5 commit 71c15f2

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

crates/ide-assists/src/handlers/extract_type_alias.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,4 +357,27 @@ impl<'outer, Outer, const OUTER: usize> () {
357357
"#,
358358
);
359359
}
360+
361+
#[test]
362+
fn issue_11197 () {
363+
check_assist(extract_type_alias,
364+
r#"
365+
struct Foo<T, const N: usize>
366+
where
367+
[T; N]: Sized,
368+
{
369+
arr: $0[T; N]$0,
370+
}
371+
"#,
372+
r#"
373+
type $0Type<T, const N: usize> = [T; N];
374+
375+
struct Foo<T, const N: usize>
376+
where
377+
[T; N]: Sized,
378+
{
379+
arr: Type<T, N>,
380+
}
381+
"#);
382+
}
360383
}

0 commit comments

Comments
 (0)