Add test for #10535

This commit is contained in:
Samuel Moelius 2023-07-08 19:11:15 -04:00
parent 6ae065ffd6
commit b4738a6b57
2 changed files with 24 additions and 0 deletions

View File

@ -492,3 +492,15 @@ mod issue_9782_method_variant {
S.foo::<&[u8; 100]>(&a);
}
}
mod issue_10535 {
static SOME_STATIC: String = String::new();
static UNIT: () = compute(&SOME_STATIC);
pub const fn compute<T>(_: T)
where
T: Copy,
{
}
}

View File

@ -492,3 +492,15 @@ mod issue_9782_method_variant {
S.foo::<&[u8; 100]>(&a);
}
}
mod issue_10535 {
static SOME_STATIC: String = String::new();
static UNIT: () = compute(&SOME_STATIC);
pub const fn compute<T>(_: T)
where
T: Copy,
{
}
}