mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
add test
This commit is contained in:
parent
e3dc5a588f
commit
71c15f2a44
@ -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>,
|
||||
}
|
||||
"#);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user