fix regression_11688_2
This commit is contained in:
parent
3bff42fd14
commit
0141f28475
@ -712,7 +712,7 @@ fn substs_from_path_segment(
|
||||
.filter(|arg| !matches!(arg, GenericArg::Lifetime(_)))
|
||||
.skip(skip)
|
||||
.take(expected_num)
|
||||
.zip(def_generics.iter_id().skip(skip))
|
||||
.zip(def_generics.iter_id().skip(parent_params + skip))
|
||||
{
|
||||
if let Some(x) = generic_arg_to_chalk(
|
||||
self.db,
|
||||
|
@ -1454,3 +1454,26 @@ fn encode(self, w: &mut Writer, _: &mut S) {
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn regression_11688_2() {
|
||||
check_types(
|
||||
r#"
|
||||
union MaybeUninit<T> {
|
||||
uninit: (),
|
||||
value: T,
|
||||
}
|
||||
|
||||
impl<T> MaybeUninit<T> {
|
||||
fn uninit_array<const LEN: usize>() -> [Self; LEN] {
|
||||
loop {}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let x = MaybeUninit::<i32>::uninit_array::<1>();
|
||||
//^ [MaybeUninit<i32>; 1]
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user